/* /web/static/lib/underscore/underscore.js defined in bundle 'web.assets_common_lazy' */ (function(){var root=this;var previousUnderscore=root._;var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind,nativeCreate=Object.create;var Ctor=function(){};var _=function(obj){if(obj instanceof _)return obj;if(!(this instanceof _))return new _(obj);this._wrapped=obj;};if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports){exports=module.exports=_;} exports._=_;}else{root._=_;} _.VERSION='1.8.2';var optimizeCb=function(func,context,argCount){if(context===void 0)return func;switch(argCount==null?3:argCount){case 1:return function(value){return func.call(context,value);};case 2:return function(value,other){return func.call(context,value,other);};case 3:return function(value,index,collection){return func.call(context,value,index,collection);};case 4:return function(accumulator,value,index,collection){return func.call(context,accumulator,value,index,collection);};} return function(){return func.apply(context,arguments);};};var cb=function(value,context,argCount){if(value==null)return _.identity;if(_.isFunction(value))return optimizeCb(value,context,argCount);if(_.isObject(value))return _.matcher(value);return _.property(value);};_.iteratee=function(value,context){return cb(value,context,Infinity);};var createAssigner=function(keysFunc,undefinedOnly){return function(obj){var length=arguments.length;if(length<2||obj==null)return obj;for(var index=1;index=0&&length<=MAX_ARRAY_INDEX;};_.each=_.forEach=function(obj,iteratee,context){iteratee=optimizeCb(iteratee,context);var i,length;if(isArrayLike(obj)){for(i=0,length=obj.length;i=0&&index0?0:length-1;if(arguments.length<3){memo=obj[keys?keys[index]:index];index+=dir;} return iterator(obj,iteratee,memo,keys,index,length);};} _.reduce=_.foldl=_.inject=createReduce(1);_.reduceRight=_.foldr=createReduce(-1);_.find=_.detect=function(obj,predicate,context){var key;if(isArrayLike(obj)){key=_.findIndex(obj,predicate,context);}else{key=_.findKey(obj,predicate,context);} if(key!==void 0&&key!==-1)return obj[key];};_.filter=_.select=function(obj,predicate,context){var results=[];predicate=cb(predicate,context);_.each(obj,function(value,index,list){if(predicate(value,index,list))results.push(value);});return results;};_.reject=function(obj,predicate,context){return _.filter(obj,_.negate(cb(predicate)),context);};_.every=_.all=function(obj,predicate,context){predicate=cb(predicate,context);var keys=!isArrayLike(obj)&&_.keys(obj),length=(keys||obj).length;for(var index=0;index=0;};_.invoke=function(obj,method){var args=slice.call(arguments,2);var isFunc=_.isFunction(method);return _.map(obj,function(value){var func=isFunc?method:value[method];return func==null?func:func.apply(value,args);});};_.pluck=function(obj,key){return _.map(obj,_.property(key));};_.where=function(obj,attrs){return _.filter(obj,_.matcher(attrs));};_.findWhere=function(obj,attrs){return _.find(obj,_.matcher(attrs));};_.max=function(obj,iteratee,context){var result=-Infinity,lastComputed=-Infinity,value,computed;if(iteratee==null&&obj!=null){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;iresult){result=value;}}}else{iteratee=cb(iteratee,context);_.each(obj,function(value,index,list){computed=iteratee(value,index,list);if(computed>lastComputed||computed===-Infinity&&result===-Infinity){result=value;lastComputed=computed;}});} return result;};_.min=function(obj,iteratee,context){var result=Infinity,lastComputed=Infinity,value,computed;if(iteratee==null&&obj!=null){obj=isArrayLike(obj)?obj:_.values(obj);for(var i=0,length=obj.length;ib||a===void 0)return 1;if(a=0)if(array[idx]===item)return idx;return-1;};function createIndexFinder(dir){return function(array,predicate,context){predicate=cb(predicate,context);var length=array!=null&&array.length;var index=dir>0?0:length-1;for(;index>=0&&indexwait){if(timeout){clearTimeout(timeout);timeout=null;} previous=now;result=func.apply(context,args);if(!timeout)context=args=null;}else if(!timeout&&options.trailing!==false){timeout=setTimeout(later,remaining);} return result;};};_.debounce=function(func,wait,immediate){var timeout,args,context,timestamp,result;var later=function(){var last=_.now()-timestamp;if(last=0){timeout=setTimeout(later,wait-last);}else{timeout=null;if(!immediate){result=func.apply(context,args);if(!timeout)context=args=null;}}};return function(){context=this;args=arguments;timestamp=_.now();var callNow=immediate&&!timeout;if(!timeout)timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);context=args=null;} return result;};};_.wrap=function(func,wrapper){return _.partial(wrapper,func);};_.negate=function(predicate){return function(){return!predicate.apply(this,arguments);};};_.compose=function(){var args=arguments;var start=args.length-1;return function(){var i=start;var result=args[start].apply(this,arguments);while(i--)result=args[i].call(this,result);return result;};};_.after=function(times,func){return function(){if(--times<1){return func.apply(this,arguments);}};};_.before=function(times,func){var memo;return function(){if(--times>0){memo=func.apply(this,arguments);} if(times<=1)func=null;return memo;};};_.once=_.partial(_.before,2);var hasEnumBug=!{toString:null}.propertyIsEnumerable('toString');var nonEnumerableProps=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'];function collectNonEnumProps(obj,keys){var nonEnumIdx=nonEnumerableProps.length;var constructor=obj.constructor;var proto=(_.isFunction(constructor)&&constructor.prototype)||ObjProto;var prop='constructor';if(_.has(obj,prop)&&!_.contains(keys,prop))keys.push(prop);while(nonEnumIdx--){prop=nonEnumerableProps[nonEnumIdx];if(prop in obj&&obj[prop]!==proto[prop]&&!_.contains(keys,prop)){keys.push(prop);}}} _.keys=function(obj){if(!_.isObject(obj))return[];if(nativeKeys)return nativeKeys(obj);var keys=[];for(var key in obj)if(_.has(obj,key))keys.push(key);if(hasEnumBug)collectNonEnumProps(obj,keys);return keys;};_.allKeys=function(obj){if(!_.isObject(obj))return[];var keys=[];for(var key in obj)keys.push(key);if(hasEnumBug)collectNonEnumProps(obj,keys);return keys;};_.values=function(obj){var keys=_.keys(obj);var length=keys.length;var values=Array(length);for(var i=0;i':'>','"':'"',"'":''','`':'`'};var unescapeMap=_.invert(escapeMap);var createEscaper=function(map){var escaper=function(match){return map[match];};var source='(?:'+_.keys(map).join('|')+')';var testRegexp=RegExp(source);var replaceRegexp=RegExp(source,'g');return function(string){string=string==null?'':''+string;return testRegexp.test(string)?string.replace(replaceRegexp,escaper):string;};};_.escape=createEscaper(escapeMap);_.unescape=createEscaper(unescapeMap);_.result=function(object,property,fallback){var value=object==null?void 0:object[property];if(value===void 0){value=fallback;} return _.isFunction(value)?value.call(object):value;};var idCounter=0;_.uniqueId=function(prefix){var id=++idCounter+'';return prefix?prefix+id:id;};_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/(.)^/;var escapes={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'};var escaper=/\\|'|\r|\n|\u2028|\u2029/g;var escapeChar=function(match){return'\\'+escapes[match];};_.template=function(text,settings,oldSettings){if(!settings&&oldSettings)settings=oldSettings;settings=_.defaults({},settings,_.templateSettings);var matcher=RegExp([(settings.escape||noMatch).source,(settings.interpolate||noMatch).source,(settings.evaluate||noMatch).source].join('|')+'|$','g');var index=0;var source="__p+='";text.replace(matcher,function(match,escape,interpolate,evaluate,offset){source+=text.slice(index,offset).replace(escaper,escapeChar);index=offset+match.length;if(escape){source+="'+\n((__t=("+escape+"))==null?'':_.escape(__t))+\n'";}else if(interpolate){source+="'+\n((__t=("+interpolate+"))==null?'':__t)+\n'";}else if(evaluate){source+="';\n"+evaluate+"\n__p+='";} return match;});source+="';\n";if(!settings.variable)source='with(obj||{}){\n'+source+'}\n';source="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+ source+'return __p;\n';try{var render=new Function(settings.variable||'obj','_',source);}catch(e){e.source=source;throw e;} var template=function(data){return render.call(this,data,_);};var argument=settings.variable||'obj';template.source='function('+argument+'){\n'+source+'}';return template;};_.chain=function(obj){var instance=_(obj);instance._chain=true;return instance;};var result=function(instance,obj){return instance._chain?_(obj).chain():obj;};_.mixin=function(obj){_.each(_.functions(obj),function(name){var func=_[name]=obj[name];_.prototype[name]=function(){var args=[this._wrapped];push.apply(args,arguments);return result(this,func.apply(_,args));};});};_.mixin(_);_.each(['pop','push','reverse','shift','sort','splice','unshift'],function(name){var method=ArrayProto[name];_.prototype[name]=function(){var obj=this._wrapped;method.apply(obj,arguments);if((name==='shift'||name==='splice')&&obj.length===0)delete obj[0];return result(this,obj);};});_.each(['concat','join','slice'],function(name){var method=ArrayProto[name];_.prototype[name]=function(){return result(this,method.apply(this._wrapped,arguments));};});_.prototype.value=function(){return this._wrapped;};_.prototype.valueOf=_.prototype.toJSON=_.prototype.value;_.prototype.toString=function(){return''+this._wrapped;};if(typeof define==='function'&&define.amd){define('underscore',[],function(){return _;});}}.call(this));; /* /web/static/lib/underscore.string/lib/underscore.string.js defined in bundle 'web.assets_common_lazy' */ !function(root,String){'use strict';var nativeTrim=String.prototype.trim;var nativeTrimRight=String.prototype.trimRight;var nativeTrimLeft=String.prototype.trimLeft;var parseNumber=function(source){return source*1||0;};var strRepeat=function(str,qty){if(qty<1)return'';var result='';while(qty>0){if(qty&1)result+=str;qty>>=1,str+=str;} return result;};var slice=[].slice;var defaultToWhiteSpace=function(characters){if(characters==null) return'\\s';else if(characters.source) return characters.source;else return'['+_s.escapeRegExp(characters)+']';};function boolMatch(s,matchers){var i,matcher,down=s.toLowerCase();matchers=[].concat(matchers);for(i=0;i',quot:'"',amp:'&',apos:"'"};var reversedEscapeChars={};for(var key in escapeChars)reversedEscapeChars[escapeChars[key]]=key;reversedEscapeChars["'"]='#39';var sprintf=(function(){function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase();} var str_repeat=strRepeat;var str_format=function(){if(!str_format.cache.hasOwnProperty(arguments[0])){str_format.cache[arguments[0]]=str_format.parse(arguments[0]);} return str_format.format.call(null,str_format.cache[arguments[0]],arguments);};str_format.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type='',arg,output=[],i,k,match,pad,pad_character,pad_length;for(i=0;i=0?'+'+arg:arg);pad_character=match[4]?match[4]=='0'?'0':match[4].charAt(1):' ';pad_length=match[6]-String(arg).length;pad=match[6]?str_repeat(pad_character,pad_length):'';output.push(match[5]?arg+pad:pad+arg);}} return output.join('');};str_format.cache={};str_format.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){if((match=/^[^\x25]+/.exec(_fmt))!==null){parse_tree.push(match[0]);} else if((match=/^\x25{2}/.exec(_fmt))!==null){parse_tree.push('%');} else if((match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);while((replacement_field=replacement_field.substring(field_match[0].length))!==''){if((field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);} else if((field_match=/^\[(\d+)\]/.exec(replacement_field))!==null){field_list.push(field_match[1]);} else{throw new Error('[_.sprintf] huh?');}}} else{throw new Error('[_.sprintf] huh?');} match[2]=field_list;} else{arg_names|=2;} if(arg_names===3){throw new Error('[_.sprintf] mixing positional and named placeholders is not (yet) supported');} parse_tree.push(match);} else{throw new Error('[_.sprintf] huh?');} _fmt=_fmt.substring(match[0].length);} return parse_tree;};return str_format;})();var _s={VERSION:'2.3.0',isBlank:function(str){if(str==null)str='';return(/^\s*$/).test(str);},stripTags:function(str){if(str==null)return'';return String(str).replace(/<\/?[^>]+>/g,'');},capitalize:function(str){str=str==null?'':String(str);return str.charAt(0).toUpperCase()+str.slice(1);},chop:function(str,step){if(str==null)return[];str=String(str);step=~~step;return step>0?str.match(new RegExp('.{1,'+step+'}','g')):[str];},clean:function(str){return _s.strip(str).replace(/\s+/g,' ');},count:function(str,substr){if(str==null||substr==null)return 0;str=String(str);substr=String(substr);var count=0,pos=0,length=substr.length;while(true){pos=str.indexOf(substr,pos);if(pos===-1)break;count++;pos+=length;} return count;},chars:function(str){if(str==null)return[];return String(str).split('');},swapCase:function(str){if(str==null)return'';return String(str).replace(/\S/g,function(c){return c===c.toUpperCase()?c.toLowerCase():c.toUpperCase();});},escapeHTML:function(str){if(str==null)return'';return String(str).replace(/[&<>"']/g,function(m){return'&'+reversedEscapeChars[m]+';';});},unescapeHTML:function(str){if(str==null)return'';return String(str).replace(/\&([^;]+);/g,function(entity,entityCode){var match;if(entityCode in escapeChars){return escapeChars[entityCode];}else if(match=entityCode.match(/^#x([\da-fA-F]+)$/)){return String.fromCharCode(parseInt(match[1],16));}else if(match=entityCode.match(/^#(\d+)$/)){return String.fromCharCode(~~match[1]);}else{return entity;}});},escapeRegExp:function(str){if(str==null)return'';return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1');},splice:function(str,i,howmany,substr){var arr=_s.chars(str);arr.splice(~~i,~~howmany,substr);return arr.join('');},insert:function(str,i,substr){return _s.splice(str,i,0,substr);},include:function(str,needle){if(needle==='')return true;if(str==null)return false;return String(str).indexOf(needle)!==-1;},join:function(){var args=slice.call(arguments),separator=args.shift();if(separator==null)separator='';return args.join(separator);},lines:function(str){if(str==null)return[];return String(str).split("\n");},reverse:function(str){return _s.chars(str).reverse().join('');},startsWith:function(str,starts){if(starts==='')return true;if(str==null||starts==null)return false;str=String(str);starts=String(starts);return str.length>=starts.length&&str.slice(0,starts.length)===starts;},endsWith:function(str,ends){if(ends==='')return true;if(str==null||ends==null)return false;str=String(str);ends=String(ends);return str.length>=ends.length&&str.slice(str.length-ends.length)===ends;},succ:function(str){if(str==null)return'';str=String(str);return str.slice(0,-1)+String.fromCharCode(str.charCodeAt(str.length-1)+1);},titleize:function(str){if(str==null)return'';str=String(str).toLowerCase();return str.replace(/(?:^|\s|-)\S/g,function(c){return c.toUpperCase();});},camelize:function(str){return _s.trim(str).replace(/[-_\s]+(.)?/g,function(match,c){return c?c.toUpperCase():"";});},underscored:function(str){return _s.trim(str).replace(/([a-z\d])([A-Z]+)/g,'$1_$2').replace(/[-\s]+/g,'_').toLowerCase();},dasherize:function(str){return _s.trim(str).replace(/([A-Z])/g,'-$1').replace(/[-_\s]+/g,'-').toLowerCase();},classify:function(str){return _s.titleize(String(str).replace(/[\W_]/g,' ')).replace(/\s/g,'');},humanize:function(str){return _s.capitalize(_s.underscored(str).replace(/_id$/,'').replace(/_/g,' '));},trim:function(str,characters){if(str==null)return'';if(!characters&&nativeTrim)return nativeTrim.call(str);characters=defaultToWhiteSpace(characters);return String(str).replace(new RegExp('\^'+characters+'+|'+characters+'+$','g'),'');},ltrim:function(str,characters){if(str==null)return'';if(!characters&&nativeTrimLeft)return nativeTrimLeft.call(str);characters=defaultToWhiteSpace(characters);return String(str).replace(new RegExp('^'+characters+'+'),'');},rtrim:function(str,characters){if(str==null)return'';if(!characters&&nativeTrimRight)return nativeTrimRight.call(str);characters=defaultToWhiteSpace(characters);return String(str).replace(new RegExp(characters+'+$'),'');},truncate:function(str,length,truncateStr){if(str==null)return'';str=String(str);truncateStr=truncateStr||'...';length=~~length;return str.length>length?str.slice(0,length)+truncateStr:str;},prune:function(str,length,pruneStr){if(str==null)return'';str=String(str);length=~~length;pruneStr=pruneStr!=null?String(pruneStr):'...';if(str.length<=length)return str;var tmpl=function(c){return c.toUpperCase()!==c.toLowerCase()?'A':' ';},template=str.slice(0,length+1).replace(/.(?=\W*\w*$)/g,tmpl);if(template.slice(template.length-2).match(/\w\w/)) template=template.replace(/\s*\S+$/,'');else template=_s.rtrim(template.slice(0,template.length-1));return(template+pruneStr).length>str.length?str:str.slice(0,template.length)+pruneStr;},words:function(str,delimiter){if(_s.isBlank(str))return[];return _s.trim(str,delimiter).split(delimiter||/\s+/);},pad:function(str,length,padStr,type){str=str==null?'':String(str);length=~~length;var padlen=0;if(!padStr) padStr=' ';else if(padStr.length>1) padStr=padStr.charAt(0);switch(type){case'right':padlen=length-str.length;return str+strRepeat(padStr,padlen);case'both':padlen=length-str.length;return strRepeat(padStr,Math.ceil(padlen/2))+str +strRepeat(padStr,Math.floor(padlen/2));default:padlen=length-str.length;return strRepeat(padStr,padlen)+str;}},lpad:function(str,length,padStr){return _s.pad(str,length,padStr);},rpad:function(str,length,padStr){return _s.pad(str,length,padStr,'right');},lrpad:function(str,length,padStr){return _s.pad(str,length,padStr,'both');},sprintf:sprintf,vsprintf:function(fmt,argv){argv.unshift(fmt);return sprintf.apply(null,argv);},toNumber:function(str,decimals){if(!str)return 0;str=_s.trim(str);if(!str.match(/^-?\d+(?:\.\d+)?$/))return NaN;return parseNumber(parseNumber(str).toFixed(~~decimals));},numberFormat:function(number,dec,dsep,tsep){if(isNaN(number)||number==null)return'';number=number.toFixed(~~dec);tsep=typeof tsep=='string'?tsep:',';var parts=number.split('.'),fnums=parts[0],decimals=parts[1]?(dsep||'.')+parts[1]:'';return fnums.replace(/(\d)(?=(?:\d{3})+$)/g,'$1'+tsep)+decimals;},strRight:function(str,sep){if(str==null)return'';str=String(str);sep=sep!=null?String(sep):sep;var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str;},strRightBack:function(str,sep){if(str==null)return'';str=String(str);sep=sep!=null?String(sep):sep;var pos=!sep?-1:str.lastIndexOf(sep);return~pos?str.slice(pos+sep.length,str.length):str;},strLeft:function(str,sep){if(str==null)return'';str=String(str);sep=sep!=null?String(sep):sep;var pos=!sep?-1:str.indexOf(sep);return~pos?str.slice(0,pos):str;},strLeftBack:function(str,sep){if(str==null)return'';str+='';sep=sep!=null?''+sep:sep;var pos=str.lastIndexOf(sep);return~pos?str.slice(0,pos):str;},toSentence:function(array,separator,lastSeparator,serial){separator=separator||', ';lastSeparator=lastSeparator||' and ';var a=array.slice(),lastMember=a.pop();if(array.length>2&&serial)lastSeparator=_s.rtrim(separator)+lastSeparator;return a.length?a.join(separator)+lastSeparator+lastMember:lastMember;},toSentenceSerial:function(){var args=slice.call(arguments);args[3]=true;return _s.toSentence.apply(_s,args);},slugify:function(str){if(str==null)return'';var from="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",to="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",regex=new RegExp(defaultToWhiteSpace(from),'g');str=String(str).toLowerCase().replace(regex,function(c){var index=from.indexOf(c);return to.charAt(index)||'-';});return _s.dasherize(str.replace(/[^\w\s-]/g,''));},surround:function(str,wrapper){return[wrapper,str,wrapper].join('');},quote:function(str,quoteChar){return _s.surround(str,quoteChar||'"');},unquote:function(str,quoteChar){quoteChar=quoteChar||'"';if(str[0]===quoteChar&&str[str.length-1]===quoteChar) return str.slice(1,str.length-1);else return str;},exports:function(){var result={};for(var prop in this){if(!this.hasOwnProperty(prop)||prop.match(/^(?:include|contains|reverse)$/))continue;result[prop]=this[prop];} return result;},repeat:function(str,qty,separator){if(str==null)return'';qty=~~qty;if(separator==null)return strRepeat(String(str),qty);for(var repeat=[];qty>0;repeat[--qty]=str){} return repeat.join(separator);},naturalCmp:function(str1,str2){if(str1==str2)return 0;if(!str1)return-1;if(!str2)return 1;var cmpRegex=/(\.\d+)|(\d+)|(\D+)/g,tokens1=String(str1).toLowerCase().match(cmpRegex),tokens2=String(str2).toLowerCase().match(cmpRegex),count=Math.min(tokens1.length,tokens2.length);for(var i=0;i>>0;for(var i=0;i0){for(i in momentProperties){prop=momentProperties[i];val=from[prop];if(!isUndefined(val)){to[prop]=val;}}} return to;} var updateInProgress=false;function Moment(config){copyConfig(this,config);this._d=new Date(config._d!=null?config._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN);} if(updateInProgress===false){updateInProgress=true;hooks.updateOffset(this);updateInProgress=false;}} function isMoment(obj){return obj instanceof Moment||(obj!=null&&obj._isAMomentObject!=null);} function absFloor(number){if(number<0){return Math.ceil(number)||0;}else{return Math.floor(number);}} function toInt(argumentForCoercion){var coercedNumber=+argumentForCoercion,value=0;if(coercedNumber!==0&&isFinite(coercedNumber)){value=absFloor(coercedNumber);} return value;} function compareArrays(array1,array2,dontConvert){var len=Math.min(array1.length,array2.length),lengthDiff=Math.abs(array1.length-array2.length),diffs=0,i;for(i=0;i0?'future':'past'];return isFunction(format)?format(output):format.replace(/%s/i,output);} var aliases={};function addUnitAlias(unit,shorthand){var lowerCase=unit.toLowerCase();aliases[lowerCase]=aliases[lowerCase+'s']=aliases[shorthand]=unit;} function normalizeUnits(units){return typeof units==='string'?aliases[units]||aliases[units.toLowerCase()]:undefined;} function normalizeObjectUnits(inputObject){var normalizedInput={},normalizedProp,prop;for(prop in inputObject){if(hasOwnProp(inputObject,prop)){normalizedProp=normalizeUnits(prop);if(normalizedProp){normalizedInput[normalizedProp]=inputObject[prop];}}} return normalizedInput;} var priorities={};function addUnitPriority(unit,priority){priorities[unit]=priority;} function getPrioritizedUnits(unitsObj){var units=[];for(var u in unitsObj){units.push({unit:u,priority:priorities[u]});} units.sort(function(a,b){return a.priority-b.priority;});return units;} function makeGetSet(unit,keepTime){return function(value){if(value!=null){set$1(this,unit,value);hooks.updateOffset(this,keepTime);return this;}else{return get(this,unit);}};} function get(mom,unit){return mom.isValid()?mom._d['get'+(mom._isUTC?'UTC':'')+unit]():NaN;} function set$1(mom,unit,value){if(mom.isValid()){mom._d['set'+(mom._isUTC?'UTC':'')+unit](value);}} function stringGet(units){units=normalizeUnits(units);if(isFunction(this[units])){return this[units]();} return this;} function stringSet(units,value){if(typeof units==='object'){units=normalizeObjectUnits(units);var prioritized=getPrioritizedUnits(units);for(var i=0;i=0;return(sign?(forceSign?'+':''):'-')+ Math.pow(10,Math.max(0,zerosToFill)).toString().substr(1)+absNumber;} var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;var localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;var formatFunctions={};var formatTokenFunctions={};function addFormatToken(token,padded,ordinal,callback){var func=callback;if(typeof callback==='string'){func=function(){return this[callback]();};} if(token){formatTokenFunctions[token]=func;} if(padded){formatTokenFunctions[padded[0]]=function(){return zeroFill(func.apply(this,arguments),padded[1],padded[2]);};} if(ordinal){formatTokenFunctions[ordinal]=function(){return this.localeData().ordinal(func.apply(this,arguments),token);};}} function removeFormattingTokens(input){if(input.match(/\[[\s\S]/)){return input.replace(/^\[|\]$/g,'');} return input.replace(/\\/g,'');} function makeFormatFunction(format){var array=format.match(formattingTokens),i,length;for(i=0,length=array.length;i=0&&localFormattingTokens.test(format)){format=format.replace(localFormattingTokens,replaceLongDateFormatTokens);localFormattingTokens.lastIndex=0;i-=1;} return format;} var match1=/\d/;var match2=/\d\d/;var match3=/\d{3}/;var match4=/\d{4}/;var match6=/[+-]?\d{6}/;var match1to2=/\d\d?/;var match3to4=/\d\d\d\d?/;var match5to6=/\d\d\d\d\d\d?/;var match1to3=/\d{1,3}/;var match1to4=/\d{1,4}/;var match1to6=/[+-]?\d{1,6}/;var matchUnsigned=/\d+/;var matchSigned=/[+-]?\d+/;var matchOffset=/Z|[+-]\d\d:?\d\d/gi;var matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi;var matchTimestamp=/[+-]?\d+(\.\d{1,3})?/;var matchWord=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;var regexes={};function addRegexToken(token,regex,strictRegex){regexes[token]=isFunction(regex)?regex:function(isStrict,localeData){return(isStrict&&strictRegex)?strictRegex:regex;};} function getParseRegexForToken(token,config){if(!hasOwnProp(regexes,token)){return new RegExp(unescapeFormat(token));} return regexes[token](config._strict,config._locale);} function unescapeFormat(s){return regexEscape(s.replace('\\','').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(matched,p1,p2,p3,p4){return p1||p2||p3||p4;}));} function regexEscape(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&');} var tokens={};function addParseToken(token,callback){var i,func=callback;if(typeof token==='string'){token=[token];} if(isNumber(callback)){func=function(input,array){array[callback]=toInt(input);};} for(i=0;i68?1900:2000);};var getSetYear=makeGetSet('FullYear',true);function getIsLeapYear(){return isLeapYear(this.year());} function createDate(y,m,d,h,M,s,ms){var date=new Date(y,m,d,h,M,s,ms);if(y<100&&y>=0&&isFinite(date.getFullYear())){date.setFullYear(y);} return date;} function createUTCDate(y){var date=new Date(Date.UTC.apply(null,arguments));if(y<100&&y>=0&&isFinite(date.getUTCFullYear())){date.setUTCFullYear(y);} return date;} function firstWeekOffset(year,dow,doy){var fwd=7+dow-doy,fwdlw=(7+createUTCDate(year,0,fwd).getUTCDay()-dow)%7;return-fwdlw+fwd-1;} function dayOfYearFromWeeks(year,week,weekday,dow,doy){var localWeekday=(7+weekday-dow)%7,weekOffset=firstWeekOffset(year,dow,doy),dayOfYear=1+7*(week-1)+localWeekday+weekOffset,resYear,resDayOfYear;if(dayOfYear<=0){resYear=year-1;resDayOfYear=daysInYear(resYear)+dayOfYear;}else if(dayOfYear>daysInYear(year)){resYear=year+1;resDayOfYear=dayOfYear-daysInYear(year);}else{resYear=year;resDayOfYear=dayOfYear;} return{year:resYear,dayOfYear:resDayOfYear};} function weekOfYear(mom,dow,doy){var weekOffset=firstWeekOffset(mom.year(),dow,doy),week=Math.floor((mom.dayOfYear()-weekOffset-1)/7)+1,resWeek,resYear;if(week<1){resYear=mom.year()-1;resWeek=week+weeksInYear(resYear,dow,doy);}else if(week>weeksInYear(mom.year(),dow,doy)){resWeek=week-weeksInYear(mom.year(),dow,doy);resYear=mom.year()+1;}else{resYear=mom.year();resWeek=week;} return{week:resWeek,year:resYear};} function weeksInYear(year,dow,doy){var weekOffset=firstWeekOffset(year,dow,doy),weekOffsetNext=firstWeekOffset(year+1,dow,doy);return(daysInYear(year)-weekOffset+weekOffsetNext)/7;} addFormatToken('w',['ww',2],'wo','week');addFormatToken('W',['WW',2],'Wo','isoWeek');addUnitAlias('week','w');addUnitAlias('isoWeek','W');addUnitPriority('week',5);addUnitPriority('isoWeek',5);addRegexToken('w',match1to2);addRegexToken('ww',match1to2,match2);addRegexToken('W',match1to2);addRegexToken('WW',match1to2,match2);addWeekParseToken(['w','ww','W','WW'],function(input,week,config,token){week[token.substr(0,1)]=toInt(input);});function localeWeek(mom){return weekOfYear(mom,this._week.dow,this._week.doy).week;} var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow;} function localeFirstDayOfYear(){return this._week.doy;} function getSetWeek(input){var week=this.localeData().week(this);return input==null?week:this.add((input-week)*7,'d');} function getSetISOWeek(input){var week=weekOfYear(this,1,4).week;return input==null?week:this.add((input-week)*7,'d');} addFormatToken('d',0,'do','day');addFormatToken('dd',0,0,function(format){return this.localeData().weekdaysMin(this,format);});addFormatToken('ddd',0,0,function(format){return this.localeData().weekdaysShort(this,format);});addFormatToken('dddd',0,0,function(format){return this.localeData().weekdays(this,format);});addFormatToken('e',0,0,'weekday');addFormatToken('E',0,0,'isoWeekday');addUnitAlias('day','d');addUnitAlias('weekday','e');addUnitAlias('isoWeekday','E');addUnitPriority('day',11);addUnitPriority('weekday',11);addUnitPriority('isoWeekday',11);addRegexToken('d',match1to2);addRegexToken('e',match1to2);addRegexToken('E',match1to2);addRegexToken('dd',function(isStrict,locale){return locale.weekdaysMinRegex(isStrict);});addRegexToken('ddd',function(isStrict,locale){return locale.weekdaysShortRegex(isStrict);});addRegexToken('dddd',function(isStrict,locale){return locale.weekdaysRegex(isStrict);});addWeekParseToken(['dd','ddd','dddd'],function(input,week,config,token){var weekday=config._locale.weekdaysParse(input,token,config._strict);if(weekday!=null){week.d=weekday;}else{getParsingFlags(config).invalidWeekday=input;}});addWeekParseToken(['d','e','E'],function(input,week,config,token){week[token]=toInt(input);});function parseWeekday(input,locale){if(typeof input!=='string'){return input;} if(!isNaN(input)){return parseInt(input,10);} input=locale.weekdaysParse(input);if(typeof input==='number'){return input;} return null;} function parseIsoWeekday(input,locale){if(typeof input==='string'){return locale.weekdaysParse(input)%7||7;} return isNaN(input)?null:input;} var defaultLocaleWeekdays='Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');function localeWeekdays(m,format){if(!m){return this._weekdays;} return isArray(this._weekdays)?this._weekdays[m.day()]:this._weekdays[this._weekdays.isFormat.test(format)?'format':'standalone'][m.day()];} var defaultLocaleWeekdaysShort='Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');function localeWeekdaysShort(m){return(m)?this._weekdaysShort[m.day()]:this._weekdaysShort;} var defaultLocaleWeekdaysMin='Su_Mo_Tu_We_Th_Fr_Sa'.split('_');function localeWeekdaysMin(m){return(m)?this._weekdaysMin[m.day()]:this._weekdaysMin;} function handleStrictParse$1(weekdayName,format,strict){var i,ii,mom,llc=weekdayName.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(i=0;i<7;++i){mom=createUTC([2000,1]).day(i);this._minWeekdaysParse[i]=this.weekdaysMin(mom,'').toLocaleLowerCase();this._shortWeekdaysParse[i]=this.weekdaysShort(mom,'').toLocaleLowerCase();this._weekdaysParse[i]=this.weekdays(mom,'').toLocaleLowerCase();}} if(strict){if(format==='dddd'){ii=indexOf$1.call(this._weekdaysParse,llc);return ii!==-1?ii:null;}else if(format==='ddd'){ii=indexOf$1.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null;}else{ii=indexOf$1.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}}else{if(format==='dddd'){ii=indexOf$1.call(this._weekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf$1.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf$1.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}else if(format==='ddd'){ii=indexOf$1.call(this._shortWeekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf$1.call(this._weekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf$1.call(this._minWeekdaysParse,llc);return ii!==-1?ii:null;}else{ii=indexOf$1.call(this._minWeekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf$1.call(this._weekdaysParse,llc);if(ii!==-1){return ii;} ii=indexOf$1.call(this._shortWeekdaysParse,llc);return ii!==-1?ii:null;}}} function localeWeekdaysParse(weekdayName,format,strict){var i,mom,regex;if(this._weekdaysParseExact){return handleStrictParse$1.call(this,weekdayName,format,strict);} if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[];} for(i=0;i<7;i++){mom=createUTC([2000,1]).day(i);if(strict&&!this._fullWeekdaysParse[i]){this._fullWeekdaysParse[i]=new RegExp('^'+this.weekdays(mom,'').replace('.','\.?')+'$','i');this._shortWeekdaysParse[i]=new RegExp('^'+this.weekdaysShort(mom,'').replace('.','\.?')+'$','i');this._minWeekdaysParse[i]=new RegExp('^'+this.weekdaysMin(mom,'').replace('.','\.?')+'$','i');} if(!this._weekdaysParse[i]){regex='^'+this.weekdays(mom,'')+'|^'+this.weekdaysShort(mom,'')+'|^'+this.weekdaysMin(mom,'');this._weekdaysParse[i]=new RegExp(regex.replace('.',''),'i');} if(strict&&format==='dddd'&&this._fullWeekdaysParse[i].test(weekdayName)){return i;}else if(strict&&format==='ddd'&&this._shortWeekdaysParse[i].test(weekdayName)){return i;}else if(strict&&format==='dd'&&this._minWeekdaysParse[i].test(weekdayName)){return i;}else if(!strict&&this._weekdaysParse[i].test(weekdayName)){return i;}}} function getSetDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;} var day=this._isUTC?this._d.getUTCDay():this._d.getDay();if(input!=null){input=parseWeekday(input,this.localeData());return this.add(input-day,'d');}else{return day;}} function getSetLocaleDayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;} var weekday=(this.day()+7-this.localeData()._week.dow)%7;return input==null?weekday:this.add(input-weekday,'d');} function getSetISODayOfWeek(input){if(!this.isValid()){return input!=null?this:NaN;} if(input!=null){var weekday=parseIsoWeekday(input,this.localeData());return this.day(this.day()%7?weekday:weekday-7);}else{return this.day()||7;}} var defaultWeekdaysRegex=matchWord;function weekdaysRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);} if(isStrict){return this._weekdaysStrictRegex;}else{return this._weekdaysRegex;}}else{if(!hasOwnProp(this,'_weekdaysRegex')){this._weekdaysRegex=defaultWeekdaysRegex;} return this._weekdaysStrictRegex&&isStrict?this._weekdaysStrictRegex:this._weekdaysRegex;}} var defaultWeekdaysShortRegex=matchWord;function weekdaysShortRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);} if(isStrict){return this._weekdaysShortStrictRegex;}else{return this._weekdaysShortRegex;}}else{if(!hasOwnProp(this,'_weekdaysShortRegex')){this._weekdaysShortRegex=defaultWeekdaysShortRegex;} return this._weekdaysShortStrictRegex&&isStrict?this._weekdaysShortStrictRegex:this._weekdaysShortRegex;}} var defaultWeekdaysMinRegex=matchWord;function weekdaysMinRegex(isStrict){if(this._weekdaysParseExact){if(!hasOwnProp(this,'_weekdaysRegex')){computeWeekdaysParse.call(this);} if(isStrict){return this._weekdaysMinStrictRegex;}else{return this._weekdaysMinRegex;}}else{if(!hasOwnProp(this,'_weekdaysMinRegex')){this._weekdaysMinRegex=defaultWeekdaysMinRegex;} return this._weekdaysMinStrictRegex&&isStrict?this._weekdaysMinStrictRegex:this._weekdaysMinRegex;}} function computeWeekdaysParse(){function cmpLenRev(a,b){return b.length-a.length;} var minPieces=[],shortPieces=[],longPieces=[],mixedPieces=[],i,mom,minp,shortp,longp;for(i=0;i<7;i++){mom=createUTC([2000,1]).day(i);minp=this.weekdaysMin(mom,'');shortp=this.weekdaysShort(mom,'');longp=this.weekdays(mom,'');minPieces.push(minp);shortPieces.push(shortp);longPieces.push(longp);mixedPieces.push(minp);mixedPieces.push(shortp);mixedPieces.push(longp);} minPieces.sort(cmpLenRev);shortPieces.sort(cmpLenRev);longPieces.sort(cmpLenRev);mixedPieces.sort(cmpLenRev);for(i=0;i<7;i++){shortPieces[i]=regexEscape(shortPieces[i]);longPieces[i]=regexEscape(longPieces[i]);mixedPieces[i]=regexEscape(mixedPieces[i]);} this._weekdaysRegex=new RegExp('^('+mixedPieces.join('|')+')','i');this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp('^('+longPieces.join('|')+')','i');this._weekdaysShortStrictRegex=new RegExp('^('+shortPieces.join('|')+')','i');this._weekdaysMinStrictRegex=new RegExp('^('+minPieces.join('|')+')','i');} function hFormat(){return this.hours()%12||12;} function kFormat(){return this.hours()||24;} addFormatToken('H',['HH',2],0,'hour');addFormatToken('h',['hh',2],0,hFormat);addFormatToken('k',['kk',2],0,kFormat);addFormatToken('hmm',0,0,function(){return''+hFormat.apply(this)+zeroFill(this.minutes(),2);});addFormatToken('hmmss',0,0,function(){return''+hFormat.apply(this)+zeroFill(this.minutes(),2)+ zeroFill(this.seconds(),2);});addFormatToken('Hmm',0,0,function(){return''+this.hours()+zeroFill(this.minutes(),2);});addFormatToken('Hmmss',0,0,function(){return''+this.hours()+zeroFill(this.minutes(),2)+ zeroFill(this.seconds(),2);});function meridiem(token,lowercase){addFormatToken(token,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),lowercase);});} meridiem('a',true);meridiem('A',false);addUnitAlias('hour','h');addUnitPriority('hour',13);function matchMeridiem(isStrict,locale){return locale._meridiemParse;} addRegexToken('a',matchMeridiem);addRegexToken('A',matchMeridiem);addRegexToken('H',match1to2);addRegexToken('h',match1to2);addRegexToken('HH',match1to2,match2);addRegexToken('hh',match1to2,match2);addRegexToken('hmm',match3to4);addRegexToken('hmmss',match5to6);addRegexToken('Hmm',match3to4);addRegexToken('Hmmss',match5to6);addParseToken(['H','HH'],HOUR);addParseToken(['a','A'],function(input,array,config){config._isPm=config._locale.isPM(input);config._meridiem=input;});addParseToken(['h','hh'],function(input,array,config){array[HOUR]=toInt(input);getParsingFlags(config).bigHour=true;});addParseToken('hmm',function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos));getParsingFlags(config).bigHour=true;});addParseToken('hmmss',function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2));getParsingFlags(config).bigHour=true;});addParseToken('Hmm',function(input,array,config){var pos=input.length-2;array[HOUR]=toInt(input.substr(0,pos));array[MINUTE]=toInt(input.substr(pos));});addParseToken('Hmmss',function(input,array,config){var pos1=input.length-4;var pos2=input.length-2;array[HOUR]=toInt(input.substr(0,pos1));array[MINUTE]=toInt(input.substr(pos1,2));array[SECOND]=toInt(input.substr(pos2));});function localeIsPM(input){return((input+'').toLowerCase().charAt(0)==='p');} var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i;function localeMeridiem(hours,minutes,isLower){if(hours>11){return isLower?'pm':'PM';}else{return isLower?'am':'AM';}} var getSetHour=makeGetSet('Hours',true);var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,ordinalParse:defaultOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse};var locales={};var localeFamilies={};var globalLocale;function normalizeLocale(key){return key?key.toLowerCase().replace('_','-'):key;} function chooseLocale(names){var i=0,j,next,locale,split;while(i0){locale=loadLocale(split.slice(0,j).join('-'));if(locale){return locale;} if(next&&next.length>=j&&compareArrays(split,next,true)>=j-1){break;} j--;} i++;} return null;} function loadLocale(name){var oldLocale=null;if(!locales[name]&&(typeof module!=='undefined')&&module&&module.exports){try{oldLocale=globalLocale._abbr;require('./locale/'+name);getSetGlobalLocale(oldLocale);}catch(e){}} return locales[name];} function getSetGlobalLocale(key,values){var data;if(key){if(isUndefined(values)){data=getLocale(key);} else{data=defineLocale(key,values);} if(data){globalLocale=data;}} return globalLocale._abbr;} function defineLocale(name,config){if(config!==null){var parentConfig=baseConfig;config.abbr=name;if(locales[name]!=null){deprecateSimple('defineLocaleOverride','use moment.updateLocale(localeName, config) to change '+'an existing locale. moment.defineLocale(localeName, '+'config) should only be used for creating a new locale '+'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');parentConfig=locales[name]._config;}else if(config.parentLocale!=null){if(locales[config.parentLocale]!=null){parentConfig=locales[config.parentLocale]._config;}else{if(!localeFamilies[config.parentLocale]){localeFamilies[config.parentLocale]=[];} localeFamilies[config.parentLocale].push({name:name,config:config});return null;}} locales[name]=new Locale(mergeConfigs(parentConfig,config));if(localeFamilies[name]){localeFamilies[name].forEach(function(x){defineLocale(x.name,x.config);});} getSetGlobalLocale(name);return locales[name];}else{delete locales[name];return null;}} function updateLocale(name,config){if(config!=null){var locale,parentConfig=baseConfig;if(locales[name]!=null){parentConfig=locales[name]._config;} config=mergeConfigs(parentConfig,config);locale=new Locale(config);locale.parentLocale=locales[name];locales[name]=locale;getSetGlobalLocale(name);}else{if(locales[name]!=null){if(locales[name].parentLocale!=null){locales[name]=locales[name].parentLocale;}else if(locales[name]!=null){delete locales[name];}}} return locales[name];} function getLocale(key){var locale;if(key&&key._locale&&key._locale._abbr){key=key._locale._abbr;} if(!key){return globalLocale;} if(!isArray(key)){locale=loadLocale(key);if(locale){return locale;} key=[key];} return chooseLocale(key);} function listLocales(){return keys$1(locales);} function checkOverflow(m){var overflow;var a=m._a;if(a&&getParsingFlags(m).overflow===-2){overflow=a[MONTH]<0||a[MONTH]>11?MONTH:a[DATE]<1||a[DATE]>daysInMonth(a[YEAR],a[MONTH])?DATE:a[HOUR]<0||a[HOUR]>24||(a[HOUR]===24&&(a[MINUTE]!==0||a[SECOND]!==0||a[MILLISECOND]!==0))?HOUR:a[MINUTE]<0||a[MINUTE]>59?MINUTE:a[SECOND]<0||a[SECOND]>59?SECOND:a[MILLISECOND]<0||a[MILLISECOND]>999?MILLISECOND:-1;if(getParsingFlags(m)._overflowDayOfYear&&(overflowDATE)){overflow=DATE;} if(getParsingFlags(m)._overflowWeeks&&overflow===-1){overflow=WEEK;} if(getParsingFlags(m)._overflowWeekday&&overflow===-1){overflow=WEEKDAY;} getParsingFlags(m).overflow=overflow;} return m;} var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;var basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;var tzRegex=/Z|[+-]\d\d(?::?\d\d)?/;var isoDates=[['YYYYYY-MM-DD',/[+-]\d{6}-\d\d-\d\d/],['YYYY-MM-DD',/\d{4}-\d\d-\d\d/],['GGGG-[W]WW-E',/\d{4}-W\d\d-\d/],['GGGG-[W]WW',/\d{4}-W\d\d/,false],['YYYY-DDD',/\d{4}-\d{3}/],['YYYY-MM',/\d{4}-\d\d/,false],['YYYYYYMMDD',/[+-]\d{10}/],['YYYYMMDD',/\d{8}/],['GGGG[W]WWE',/\d{4}W\d{3}/],['GGGG[W]WW',/\d{4}W\d{2}/,false],['YYYYDDD',/\d{7}/]];var isoTimes=[['HH:mm:ss.SSSS',/\d\d:\d\d:\d\d\.\d+/],['HH:mm:ss,SSSS',/\d\d:\d\d:\d\d,\d+/],['HH:mm:ss',/\d\d:\d\d:\d\d/],['HH:mm',/\d\d:\d\d/],['HHmmss.SSSS',/\d\d\d\d\d\d\.\d+/],['HHmmss,SSSS',/\d\d\d\d\d\d,\d+/],['HHmmss',/\d\d\d\d\d\d/],['HHmm',/\d\d\d\d/],['HH',/\d\d/]];var aspNetJsonRegex=/^\/?Date\((\-?\d+)/i;function configFromISO(config){var i,l,string=config._i,match=extendedIsoRegex.exec(string)||basicIsoRegex.exec(string),allowTime,dateFormat,timeFormat,tzFormat;if(match){getParsingFlags(config).iso=true;for(i=0,l=isoDates.length;idaysInYear(yearToUse)){getParsingFlags(config)._overflowDayOfYear=true;} date=createUTCDate(yearToUse,0,config._dayOfYear);config._a[MONTH]=date.getUTCMonth();config._a[DATE]=date.getUTCDate();} for(i=0;i<3&&config._a[i]==null;++i){config._a[i]=input[i]=currentDate[i];} for(;i<7;i++){config._a[i]=input[i]=(config._a[i]==null)?(i===2?1:0):config._a[i];} if(config._a[HOUR]===24&&config._a[MINUTE]===0&&config._a[SECOND]===0&&config._a[MILLISECOND]===0){config._nextDay=true;config._a[HOUR]=0;} config._d=(config._useUTC?createUTCDate:createDate).apply(null,input);if(config._tzm!=null){config._d.setUTCMinutes(config._d.getUTCMinutes()-config._tzm);} if(config._nextDay){config._a[HOUR]=24;}} function dayOfYearFromWeekInfo(config){var w,weekYear,week,weekday,dow,doy,temp,weekdayOverflow;w=config._w;if(w.GG!=null||w.W!=null||w.E!=null){dow=1;doy=4;weekYear=defaults(w.GG,config._a[YEAR],weekOfYear(createLocal(),1,4).year);week=defaults(w.W,1);weekday=defaults(w.E,1);if(weekday<1||weekday>7){weekdayOverflow=true;}}else{dow=config._locale._week.dow;doy=config._locale._week.doy;var curWeek=weekOfYear(createLocal(),dow,doy);weekYear=defaults(w.gg,config._a[YEAR],curWeek.year);week=defaults(w.w,curWeek.week);if(w.d!=null){weekday=w.d;if(weekday<0||weekday>6){weekdayOverflow=true;}}else if(w.e!=null){weekday=w.e+dow;if(w.e<0||w.e>6){weekdayOverflow=true;}}else{weekday=dow;}} if(week<1||week>weeksInYear(weekYear,dow,doy)){getParsingFlags(config)._overflowWeeks=true;}else if(weekdayOverflow!=null){getParsingFlags(config)._overflowWeekday=true;}else{temp=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy);config._a[YEAR]=temp.year;config._dayOfYear=temp.dayOfYear;}} hooks.ISO_8601=function(){};function configFromStringAndFormat(config){if(config._f===hooks.ISO_8601){configFromISO(config);return;} config._a=[];getParsingFlags(config).empty=true;var string=''+config._i,i,parsedInput,tokens,token,skipped,stringLength=string.length,totalParsedInputLength=0;tokens=expandFormat(config._f,config._locale).match(formattingTokens)||[];for(i=0;i0){getParsingFlags(config).unusedInput.push(skipped);} string=string.slice(string.indexOf(parsedInput)+parsedInput.length);totalParsedInputLength+=parsedInput.length;} if(formatTokenFunctions[token]){if(parsedInput){getParsingFlags(config).empty=false;} else{getParsingFlags(config).unusedTokens.push(token);} addTimeToArrayFromToken(token,parsedInput,config);} else if(config._strict&&!parsedInput){getParsingFlags(config).unusedTokens.push(token);}} getParsingFlags(config).charsLeftOver=stringLength-totalParsedInputLength;if(string.length>0){getParsingFlags(config).unusedInput.push(string);} if(config._a[HOUR]<=12&&getParsingFlags(config).bigHour===true&&config._a[HOUR]>0){getParsingFlags(config).bigHour=undefined;} getParsingFlags(config).parsedDateParts=config._a.slice(0);getParsingFlags(config).meridiem=config._meridiem;config._a[HOUR]=meridiemFixWrap(config._locale,config._a[HOUR],config._meridiem);configFromArray(config);checkOverflow(config);} function meridiemFixWrap(locale,hour,meridiem){var isPm;if(meridiem==null){return hour;} if(locale.meridiemHour!=null){return locale.meridiemHour(hour,meridiem);}else if(locale.isPM!=null){isPm=locale.isPM(meridiem);if(isPm&&hour<12){hour+=12;} if(!isPm&&hour===12){hour=0;} return hour;}else{return hour;}} function configFromStringAndArray(config){var tempConfig,bestMoment,scoreToBeat,i,currentScore;if(config._f.length===0){getParsingFlags(config).invalidFormat=true;config._d=new Date(NaN);return;} for(i=0;ithis?this:other;}else{return createInvalid();}});function pickBy(fn,moments){var res,i;if(moments.length===1&&isArray(moments[0])){moments=moments[0];} if(!moments.length){return createLocal();} res=moments[0];for(i=1;ithis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset());} function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted)){return this._isDSTShifted;} var c={};copyConfig(c,this);c=prepareConfig(c);if(c._a){var other=c._isUTC?createUTC(c._a):createLocal(c._a);this._isDSTShifted=this.isValid()&&compareArrays(c._a,other.toArray())>0;}else{this._isDSTShifted=false;} return this._isDSTShifted;} function isLocal(){return this.isValid()?!this._isUTC:false;} function isUtcOffset(){return this.isValid()?this._isUTC:false;} function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:false;} var aspNetRegex=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;var isoRegex=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;function createDuration(input,key){var duration=input,match=null,sign,ret,diffRes;if(isDuration(input)){duration={ms:input._milliseconds,d:input._days,M:input._months};}else if(isNumber(input)){duration={};if(key){duration[key]=input;}else{duration.milliseconds=input;}}else if(!!(match=aspNetRegex.exec(input))){sign=(match[1]==='-')?-1:1;duration={y:0,d:toInt(match[DATE])*sign,h:toInt(match[HOUR])*sign,m:toInt(match[MINUTE])*sign,s:toInt(match[SECOND])*sign,ms:toInt(absRound(match[MILLISECOND]*1000))*sign};}else if(!!(match=isoRegex.exec(input))){sign=(match[1]==='-')?-1:1;duration={y:parseIso(match[2],sign),M:parseIso(match[3],sign),w:parseIso(match[4],sign),d:parseIso(match[5],sign),h:parseIso(match[6],sign),m:parseIso(match[7],sign),s:parseIso(match[8],sign)};}else if(duration==null){duration={};}else if(typeof duration==='object'&&('from'in duration||'to'in duration)){diffRes=momentsDifference(createLocal(duration.from),createLocal(duration.to));duration={};duration.ms=diffRes.milliseconds;duration.M=diffRes.months;} ret=new Duration(duration);if(isDuration(input)&&hasOwnProp(input,'_locale')){ret._locale=input._locale;} return ret;} createDuration.fn=Duration.prototype;function parseIso(inp,sign){var res=inp&&parseFloat(inp.replace(',','.'));return(isNaN(res)?0:res)*sign;} function positiveMomentsDifference(base,other){var res={milliseconds:0,months:0};res.months=other.month()-base.month()+ (other.year()-base.year())*12;if(base.clone().add(res.months,'M').isAfter(other)){--res.months;} res.milliseconds=+other-+(base.clone().add(res.months,'M'));return res;} function momentsDifference(base,other){var res;if(!(base.isValid()&&other.isValid())){return{milliseconds:0,months:0};} other=cloneWithOffset(other,base);if(base.isBefore(other)){res=positiveMomentsDifference(base,other);}else{res=positiveMomentsDifference(other,base);res.milliseconds=-res.milliseconds;res.months=-res.months;} return res;} function createAdder(direction,name){return function(val,period){var dur,tmp;if(period!==null&&!isNaN(+period)){deprecateSimple(name,'moment().'+name+'(period, number) is deprecated. Please use moment().'+name+'(number, period). '+'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');tmp=val;val=period;period=tmp;} val=typeof val==='string'?+val:val;dur=createDuration(val,period);addSubtract(this,dur,direction);return this;};} function addSubtract(mom,duration,isAdding,updateOffset){var milliseconds=duration._milliseconds,days=absRound(duration._days),months=absRound(duration._months);if(!mom.isValid()){return;} updateOffset=updateOffset==null?true:updateOffset;if(milliseconds){mom._d.setTime(mom._d.valueOf()+milliseconds*isAdding);} if(days){set$1(mom,'Date',get(mom,'Date')+days*isAdding);} if(months){setMonth(mom,get(mom,'Month')+months*isAdding);} if(updateOffset){hooks.updateOffset(mom,days||months);}} var add=createAdder(1,'add');var subtract=createAdder(-1,'subtract');function getCalendarFormat(myMoment,now){var diff=myMoment.diff(now,'days',true);return diff<-6?'sameElse':diff<-1?'lastWeek':diff<0?'lastDay':diff<1?'sameDay':diff<2?'nextDay':diff<7?'nextWeek':'sameElse';} function calendar$1(time,formats){var now=time||createLocal(),sod=cloneWithOffset(now,this).startOf('day'),format=hooks.calendarFormat(this,sod)||'sameElse';var output=formats&&(isFunction(formats[format])?formats[format].call(this,now):formats[format]);return this.format(output||this.localeData().calendar(format,this,createLocal(now)));} function clone(){return new Moment(this);} function isAfter(input,units){var localInput=isMoment(input)?input:createLocal(input);if(!(this.isValid()&&localInput.isValid())){return false;} units=normalizeUnits(!isUndefined(units)?units:'millisecond');if(units==='millisecond'){return this.valueOf()>localInput.valueOf();}else{return localInput.valueOf()weeksTarget){week=weeksTarget;} return setWeekAll.call(this,input,week,weekday,dow,doy);}} function setWeekAll(weekYear,week,weekday,dow,doy){var dayOfYearData=dayOfYearFromWeeks(weekYear,week,weekday,dow,doy),date=createUTCDate(dayOfYearData.year,0,dayOfYearData.dayOfYear);this.year(date.getUTCFullYear());this.month(date.getUTCMonth());this.date(date.getUTCDate());return this;} addFormatToken('Q',0,'Qo','quarter');addUnitAlias('quarter','Q');addUnitPriority('quarter',7);addRegexToken('Q',match1);addParseToken('Q',function(input,array){array[MONTH]=(toInt(input)-1)*3;});function getSetQuarter(input){return input==null?Math.ceil((this.month()+1)/3):this.month((input-1)*3+this.month()%3);} addFormatToken('D',['DD',2],'Do','date');addUnitAlias('date','D');addUnitPriority('date',9);addRegexToken('D',match1to2);addRegexToken('DD',match1to2,match2);addRegexToken('Do',function(isStrict,locale){return isStrict?locale._ordinalParse:locale._ordinalParseLenient;});addParseToken(['D','DD'],DATE);addParseToken('Do',function(input,array){array[DATE]=toInt(input.match(match1to2)[0],10);});var getSetDayOfMonth=makeGetSet('Date',true);addFormatToken('DDD',['DDDD',3],'DDDo','dayOfYear');addUnitAlias('dayOfYear','DDD');addUnitPriority('dayOfYear',4);addRegexToken('DDD',match1to3);addRegexToken('DDDD',match3);addParseToken(['DDD','DDDD'],function(input,array,config){config._dayOfYear=toInt(input);});function getSetDayOfYear(input){var dayOfYear=Math.round((this.clone().startOf('day')-this.clone().startOf('year'))/864e5)+1;return input==null?dayOfYear:this.add((input-dayOfYear),'d');} addFormatToken('m',['mm',2],0,'minute');addUnitAlias('minute','m');addUnitPriority('minute',14);addRegexToken('m',match1to2);addRegexToken('mm',match1to2,match2);addParseToken(['m','mm'],MINUTE);var getSetMinute=makeGetSet('Minutes',false);addFormatToken('s',['ss',2],0,'second');addUnitAlias('second','s');addUnitPriority('second',15);addRegexToken('s',match1to2);addRegexToken('ss',match1to2,match2);addParseToken(['s','ss'],SECOND);var getSetSecond=makeGetSet('Seconds',false);addFormatToken('S',0,0,function(){return~~(this.millisecond()/100);});addFormatToken(0,['SS',2],0,function(){return~~(this.millisecond()/10);});addFormatToken(0,['SSS',3],0,'millisecond');addFormatToken(0,['SSSS',4],0,function(){return this.millisecond()*10;});addFormatToken(0,['SSSSS',5],0,function(){return this.millisecond()*100;});addFormatToken(0,['SSSSSS',6],0,function(){return this.millisecond()*1000;});addFormatToken(0,['SSSSSSS',7],0,function(){return this.millisecond()*10000;});addFormatToken(0,['SSSSSSSS',8],0,function(){return this.millisecond()*100000;});addFormatToken(0,['SSSSSSSSS',9],0,function(){return this.millisecond()*1000000;});addUnitAlias('millisecond','ms');addUnitPriority('millisecond',16);addRegexToken('S',match1to3,match1);addRegexToken('SS',match1to3,match2);addRegexToken('SSS',match1to3,match3);var token;for(token='SSSS';token.length<=9;token+='S'){addRegexToken(token,matchUnsigned);} function parseMs(input,array){array[MILLISECOND]=toInt(('0.'+input)*1000);} for(token='S';token.length<=9;token+='S'){addParseToken(token,parseMs);} var getSetMillisecond=makeGetSet('Milliseconds',false);addFormatToken('z',0,0,'zoneAbbr');addFormatToken('zz',0,0,'zoneName');function getZoneAbbr(){return this._isUTC?'UTC':'';} function getZoneName(){return this._isUTC?'Coordinated Universal Time':'';} var proto=Moment.prototype;proto.add=add;proto.calendar=calendar$1;proto.clone=clone;proto.diff=diff;proto.endOf=endOf;proto.format=format;proto.from=from;proto.fromNow=fromNow;proto.to=to;proto.toNow=toNow;proto.get=stringGet;proto.invalidAt=invalidAt;proto.isAfter=isAfter;proto.isBefore=isBefore;proto.isBetween=isBetween;proto.isSame=isSame;proto.isSameOrAfter=isSameOrAfter;proto.isSameOrBefore=isSameOrBefore;proto.isValid=isValid$1;proto.lang=lang;proto.locale=locale;proto.localeData=localeData;proto.max=prototypeMax;proto.min=prototypeMin;proto.parsingFlags=parsingFlags;proto.set=stringSet;proto.startOf=startOf;proto.subtract=subtract;proto.toArray=toArray;proto.toObject=toObject;proto.toDate=toDate;proto.toISOString=toISOString;proto.inspect=inspect;proto.toJSON=toJSON;proto.toString=toString;proto.unix=unix;proto.valueOf=valueOf;proto.creationData=creationData;proto.year=getSetYear;proto.isLeapYear=getIsLeapYear;proto.weekYear=getSetWeekYear;proto.isoWeekYear=getSetISOWeekYear;proto.quarter=proto.quarters=getSetQuarter;proto.month=getSetMonth;proto.daysInMonth=getDaysInMonth;proto.week=proto.weeks=getSetWeek;proto.isoWeek=proto.isoWeeks=getSetISOWeek;proto.weeksInYear=getWeeksInYear;proto.isoWeeksInYear=getISOWeeksInYear;proto.date=getSetDayOfMonth;proto.day=proto.days=getSetDayOfWeek;proto.weekday=getSetLocaleDayOfWeek;proto.isoWeekday=getSetISODayOfWeek;proto.dayOfYear=getSetDayOfYear;proto.hour=proto.hours=getSetHour;proto.minute=proto.minutes=getSetMinute;proto.second=proto.seconds=getSetSecond;proto.millisecond=proto.milliseconds=getSetMillisecond;proto.utcOffset=getSetOffset;proto.utc=setOffsetToUTC;proto.local=setOffsetToLocal;proto.parseZone=setOffsetToParsedOffset;proto.hasAlignedHourOffset=hasAlignedHourOffset;proto.isDST=isDaylightSavingTime;proto.isLocal=isLocal;proto.isUtcOffset=isUtcOffset;proto.isUtc=isUtc;proto.isUTC=isUtc;proto.zoneAbbr=getZoneAbbr;proto.zoneName=getZoneName;proto.dates=deprecate('dates accessor is deprecated. Use date instead.',getSetDayOfMonth);proto.months=deprecate('months accessor is deprecated. Use month instead',getSetMonth);proto.years=deprecate('years accessor is deprecated. Use year instead',getSetYear);proto.zone=deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',getSetZone);proto.isDSTShifted=deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',isDaylightSavingTimeShifted);function createUnix(input){return createLocal(input*1000);} function createInZone(){return createLocal.apply(null,arguments).parseZone();} function preParsePostFormat(string){return string;} var proto$1=Locale.prototype;proto$1.calendar=calendar;proto$1.longDateFormat=longDateFormat;proto$1.invalidDate=invalidDate;proto$1.ordinal=ordinal;proto$1.preparse=preParsePostFormat;proto$1.postformat=preParsePostFormat;proto$1.relativeTime=relativeTime;proto$1.pastFuture=pastFuture;proto$1.set=set;proto$1.months=localeMonths;proto$1.monthsShort=localeMonthsShort;proto$1.monthsParse=localeMonthsParse;proto$1.monthsRegex=monthsRegex;proto$1.monthsShortRegex=monthsShortRegex;proto$1.week=localeWeek;proto$1.firstDayOfYear=localeFirstDayOfYear;proto$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1.weekdays=localeWeekdays;proto$1.weekdaysMin=localeWeekdaysMin;proto$1.weekdaysShort=localeWeekdaysShort;proto$1.weekdaysParse=localeWeekdaysParse;proto$1.weekdaysRegex=weekdaysRegex;proto$1.weekdaysShortRegex=weekdaysShortRegex;proto$1.weekdaysMinRegex=weekdaysMinRegex;proto$1.isPM=localeIsPM;proto$1.meridiem=localeMeridiem;function get$1(format,index,field,setter){var locale=getLocale();var utc=createUTC().set(setter,index);return locale[field](utc,format);} function listMonthsImpl(format,index,field){if(isNumber(format)){index=format;format=undefined;} format=format||'';if(index!=null){return get$1(format,index,field,'month');} var i;var out=[];for(i=0;i<12;i++){out[i]=get$1(format,i,field,'month');} return out;} function listWeekdaysImpl(localeSorted,format,index,field){if(typeof localeSorted==='boolean'){if(isNumber(format)){index=format;format=undefined;} format=format||'';}else{format=localeSorted;index=format;localeSorted=false;if(isNumber(format)){index=format;format=undefined;} format=format||'';} var locale=getLocale(),shift=localeSorted?locale._week.dow:0;if(index!=null){return get$1(format,(index+shift)%7,field,'day');} var i;var out=[];for(i=0;i<7;i++){out[i]=get$1(format,(i+shift)%7,field,'day');} return out;} function listMonths(format,index){return listMonthsImpl(format,index,'months');} function listMonthsShort(format,index){return listMonthsImpl(format,index,'monthsShort');} function listWeekdays(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdays');} function listWeekdaysShort(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdaysShort');} function listWeekdaysMin(localeSorted,format,index){return listWeekdaysImpl(localeSorted,format,index,'weekdaysMin');} getSetGlobalLocale('en',{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(number){var b=number%10,output=(toInt(number%100/10)===1)?'th':(b===1)?'st':(b===2)?'nd':(b===3)?'rd':'th';return number+output;}});hooks.lang=deprecate('moment.lang is deprecated. Use moment.locale instead.',getSetGlobalLocale);hooks.langData=deprecate('moment.langData is deprecated. Use moment.localeData instead.',getLocale);var mathAbs=Math.abs;function abs(){var data=this._data;this._milliseconds=mathAbs(this._milliseconds);this._days=mathAbs(this._days);this._months=mathAbs(this._months);data.milliseconds=mathAbs(data.milliseconds);data.seconds=mathAbs(data.seconds);data.minutes=mathAbs(data.minutes);data.hours=mathAbs(data.hours);data.months=mathAbs(data.months);data.years=mathAbs(data.years);return this;} function addSubtract$1(duration,input,value,direction){var other=createDuration(input,value);duration._milliseconds+=direction*other._milliseconds;duration._days+=direction*other._days;duration._months+=direction*other._months;return duration._bubble();} function add$1(input,value){return addSubtract$1(this,input,value,1);} function subtract$1(input,value){return addSubtract$1(this,input,value,-1);} function absCeil(number){if(number<0){return Math.floor(number);}else{return Math.ceil(number);}} function bubble(){var milliseconds=this._milliseconds;var days=this._days;var months=this._months;var data=this._data;var seconds,minutes,hours,years,monthsFromDays;if(!((milliseconds>=0&&days>=0&&months>=0)||(milliseconds<=0&&days<=0&&months<=0))){milliseconds+=absCeil(monthsToDays(months)+days)*864e5;days=0;months=0;} data.milliseconds=milliseconds%1000;seconds=absFloor(milliseconds/1000);data.seconds=seconds%60;minutes=absFloor(seconds/60);data.minutes=minutes%60;hours=absFloor(minutes/60);data.hours=hours%24;days+=absFloor(hours/24);monthsFromDays=absFloor(daysToMonths(days));months+=monthsFromDays;days-=absCeil(monthsToDays(monthsFromDays));years=absFloor(months/12);months%=12;data.days=days;data.months=months;data.years=years;return this;} function daysToMonths(days){return days*4800/146097;} function monthsToDays(months){return months*146097/4800;} function as(units){var days;var months;var milliseconds=this._milliseconds;units=normalizeUnits(units);if(units==='month'||units==='year'){days=this._days+milliseconds/864e5;months=this._months+daysToMonths(days);return units==='month'?months:months/12;}else{days=this._days+Math.round(monthsToDays(this._months));switch(units){case'week':return days/7+milliseconds/6048e5;case'day':return days+milliseconds/864e5;case'hour':return days*24+milliseconds/36e5;case'minute':return days*1440+milliseconds/6e4;case'second':return days*86400+milliseconds/1000;case'millisecond':return Math.floor(days*864e5)+milliseconds;default:throw new Error('Unknown unit '+units);}}} function valueOf$1(){return(this._milliseconds+ this._days*864e5+ (this._months%12)*2592e6+ toInt(this._months/12)*31536e6);} function makeAs(alias){return function(){return this.as(alias);};} var asMilliseconds=makeAs('ms');var asSeconds=makeAs('s');var asMinutes=makeAs('m');var asHours=makeAs('h');var asDays=makeAs('d');var asWeeks=makeAs('w');var asMonths=makeAs('M');var asYears=makeAs('y');function get$2(units){units=normalizeUnits(units);return this[units+'s']();} function makeGetter(name){return function(){return this._data[name];};} var milliseconds=makeGetter('milliseconds');var seconds=makeGetter('seconds');var minutes=makeGetter('minutes');var hours=makeGetter('hours');var days=makeGetter('days');var months=makeGetter('months');var years=makeGetter('years');function weeks(){return absFloor(this.days()/7);} var round=Math.round;var thresholds={s:45,m:45,h:22,d:26,M:11};function substituteTimeAgo(string,number,withoutSuffix,isFuture,locale){return locale.relativeTime(number||1,!!withoutSuffix,string,isFuture);} function relativeTime$1(posNegDuration,withoutSuffix,locale){var duration=createDuration(posNegDuration).abs();var seconds=round(duration.as('s'));var minutes=round(duration.as('m'));var hours=round(duration.as('h'));var days=round(duration.as('d'));var months=round(duration.as('M'));var years=round(duration.as('y'));var a=seconds0;a[4]=locale;return substituteTimeAgo.apply(null,a);} function getSetRelativeTimeRounding(roundingFunction){if(roundingFunction===undefined){return round;} if(typeof(roundingFunction)==='function'){round=roundingFunction;return true;} return false;} function getSetRelativeTimeThreshold(threshold,limit){if(thresholds[threshold]===undefined){return false;} if(limit===undefined){return thresholds[threshold];} thresholds[threshold]=limit;return true;} function humanize(withSuffix){var locale=this.localeData();var output=relativeTime$1(this,!withSuffix,locale);if(withSuffix){output=locale.pastFuture(+this,output);} return locale.postformat(output);} var abs$1=Math.abs;function toISOString$1(){var seconds=abs$1(this._milliseconds)/1000;var days=abs$1(this._days);var months=abs$1(this._months);var minutes,hours,years;minutes=absFloor(seconds/60);hours=absFloor(minutes/60);seconds%=60;minutes%=60;years=absFloor(months/12);months%=12;var Y=years;var M=months;var D=days;var h=hours;var m=minutes;var s=seconds;var total=this.asSeconds();if(!total){return'P0D';} return(total<0?'-':'')+'P'+ (Y?Y+'Y':'')+ (M?M+'M':'')+ (D?D+'D':'')+ ((h||m||s)?'T':'')+ (h?h+'H':'')+ (m?m+'M':'')+ (s?s+'S':'');} var proto$2=Duration.prototype;proto$2.abs=abs;proto$2.add=add$1;proto$2.subtract=subtract$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.get=get$2;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale;proto$2.localeData=localeData;proto$2.toIsoString=deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',toISOString$1);proto$2.lang=lang;addFormatToken('X',0,0,'unix');addFormatToken('x',0,0,'valueOf');addRegexToken('x',matchSigned);addRegexToken('X',matchTimestamp);addParseToken('X',function(input,array,config){config._d=new Date(parseFloat(input,10)*1000);});addParseToken('x',function(input,array,config){config._d=new Date(toInt(input));});hooks.version='2.17.1';setHookCallback(createLocal);hooks.fn=proto;hooks.min=min;hooks.max=max;hooks.now=now;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto;return hooks;})));; /* /web/static/lib/owl/owl.js defined in bundle 'web.assets_common_lazy' */ (function(exports){'use strict';class EventBus{constructor(){this.subscriptions={};} on(eventType,owner,callback){if(!callback){throw new Error("Missing callback");} if(!this.subscriptions[eventType]){this.subscriptions[eventType]=[];} this.subscriptions[eventType].push({owner,callback,});} off(eventType,owner){const subs=this.subscriptions[eventType];if(subs){this.subscriptions[eventType]=subs.filter((s)=>s.owner!==owner);}} trigger(eventType,...args){const subs=this.subscriptions[eventType]||[];for(let i=0,iLen=subs.length;i",gte:">=",lt:"<",lte:"<=",});const STATIC_TOKEN_MAP=Object.assign(Object.create(null),{"{":"LEFT_BRACE","}":"RIGHT_BRACE","[":"LEFT_BRACKET","]":"RIGHT_BRACKET",":":"COLON",",":"COMMA","(":"LEFT_PAREN",")":"RIGHT_PAREN",});const OPERATORS="...,.,===,==,+,!==,!=,!,||,&&,>=,>,<=,<,?,-,*,/,%,typeof ,=>,=,;,in ".split(",");let tokenizeString=function(expr){let s=expr[0];let start=s;if(s!=="'"&&s!=='"'&&s!=="`"){return false;} let i=1;let cur;while(expr[i]&&expr[i]!==start){cur=expr[i];s+=cur;if(cur==="\\"){i++;cur=expr[i];if(!cur){throw new Error("Invalid expression");} s+=cur;} i++;} if(expr[i]!==start){throw new Error("Invalid expression");} s+=start;if(start==="`"){return{type:"TEMPLATE_STRING",value:s,replace(replacer){return s.replace(/\$\{(.*?)\}/g,(match,group)=>{return"${"+replacer(group)+"}";});},};} return{type:"VALUE",value:s};};let tokenizeNumber=function(expr){let s=expr[0];if(s&&s.match(/[0-9]/)){let i=1;while(expr[i]&&expr[i].match(/[0-9]|\./)){s+=expr[i];i++;} return{type:"VALUE",value:s};} else{return false;}};let tokenizeSymbol=function(expr){let s=expr[0];if(s&&s.match(/[a-zA-Z_\$]/)){let i=1;while(expr[i]&&expr[i].match(/\w/)){s+=expr[i];i++;} if(s in WORD_REPLACEMENT){return{type:"OPERATOR",value:WORD_REPLACEMENT[s],size:s.length};} return{type:"SYMBOL",value:s};} else{return false;}};const tokenizeStatic=function(expr){const char=expr[0];if(char&&char in STATIC_TOKEN_MAP){return{type:STATIC_TOKEN_MAP[char],value:char};} return false;};const tokenizeOperator=function(expr){for(let op of OPERATORS){if(expr.startsWith(op)){return{type:"OPERATOR",value:op};}} return false;};const TOKENIZERS=[tokenizeString,tokenizeNumber,tokenizeOperator,tokenizeSymbol,tokenizeStatic,];function tokenize(expr){const result=[];let token=true;while(token){expr=expr.trim();if(expr){for(let tokenizer of TOKENIZERS){token=tokenizer(expr);if(token){result.push(token);expr=expr.slice(token.size||token.value.length);break;}}} else{token=false;}} if(expr.length){throw new Error(`Tokenizer error: could not tokenize "${expr}"`);} return result;} const isLeftSeparator=(token)=>token&&(token.type==="LEFT_BRACE"||token.type==="COMMA");const isRightSeparator=(token)=>token&&(token.type==="RIGHT_BRACE"||token.type==="COMMA");function compileExprToArray(expr,scope){scope=Object.create(scope);const tokens=tokenize(expr);let i=0;let stack=[];while(icompileExpr(expr,scope));} if(nextToken&&nextToken.type==="OPERATOR"&&nextToken.value==="=>"){if(token.type==="RIGHT_PAREN"){let j=i-1;while(j>0&&tokens[j].type!=="LEFT_PAREN"){if(tokens[j].type==="SYMBOL"&&tokens[j].originalValue){tokens[j].value=tokens[j].originalValue;scope[tokens[j].value]={id:tokens[j].value,expr:tokens[j].value};} j--;}} else{scope[token.value]={id:token.value,expr:token.value};}} if(isVar){token.varName=token.value;if(token.value in scope&&"id"in scope[token.value]){token.value=scope[token.value].expr;} else{token.originalValue=token.value;token.value=`scope['${token.value}']`;}} i++;} return tokens;} function compileExpr(expr,scope){return compileExprToArray(expr,scope).map((t)=>t.value).join("");} const INTERP_REGEXP=/\{\{.*?\}\}/g;class CompilationContext{constructor(name){this.code=[];this.variables={};this.escaping=false;this.parentNode=null;this.parentTextNode=null;this.rootNode=null;this.indentLevel=0;this.shouldDefineParent=false;this.shouldDefineScope=false;this.protectedScopeNumber=0;this.shouldDefineQWeb=false;this.shouldDefineUtils=false;this.shouldDefineRefs=false;this.shouldDefineResult=true;this.loopNumber=0;this.inPreTag=false;this.allowMultipleRoots=false;this.hasParentWidget=false;this.hasKey0=false;this.keyStack=[];this.rootContext=this;this.templateName=name||"noname";this.addLine("let h = this.h;");} generateID(){return CompilationContext.nextID++;} generateTemplateKey(prefix=""){const id=this.generateID();if(this.loopNumber===0&&!this.hasKey0){return`'${prefix}__${id}__'`;} let key=`\`${prefix}__${id}__`;let start=this.hasKey0?0:1;for(let i=start;i{if(tok.varName){if(!done.has(tok.varName)){done.add(tok.varName);this.addLine(`const ${tok.varName}_${argId} = ${tok.value};`);} tok.value=`${tok.varName}_${argId}`;} return tok.value;}).join("");} interpolate(s){let matches=s.match(INTERP_REGEXP);if(matches&&matches[0].length===s.length){return`(${this.formatExpression(s.slice(2, -2))})`;} let r=s.replace(/\{\{.*?\}\}/g,(s)=>"${"+this.formatExpression(s.slice(2,-2))+"}");return"`"+r+"`";} startProtectScope(codeBlock){const protectID=this.generateID();this.rootContext.protectedScopeNumber++;this.rootContext.shouldDefineScope=true;const scopeExpr=`Object.create(scope);`;this.addLine(`let _origScope${protectID} = scope;`);this.addLine(`scope = ${scopeExpr}`);if(!codeBlock){this.addLine(`scope.__access_mode__ = 'ro';`);} return protectID;} stopProtectScope(protectID){this.rootContext.protectedScopeNumber--;this.addLine(`scope = _origScope${protectID};`);}} CompilationContext.nextID=1;function updateProps(oldVnode,vnode){var key,cur,old,elm=vnode.elm,oldProps=oldVnode.data.props,props=vnode.data.props;if(!oldProps&&!props) return;if(oldProps===props) return;oldProps=oldProps||{};props=props||{};for(key in oldProps){if(!props[key]){delete elm[key];}} for(key in props){cur=props[key];old=oldProps[key];if(old!==cur&&(key!=="value"||elm[key]!==cur)){elm[key]=cur;}}} const propsModule={create:updateProps,update:updateProps,};function invokeHandler(handler,vnode,event){if(typeof handler==="function"){handler.call(vnode,event,vnode);} else if(typeof handler==="object"){if(typeof handler[0]==="function"){if(handler.length===2){handler[0].call(vnode,handler[1],event,vnode);} else{var args=handler.slice(1);args.push(event);args.push(vnode);handler[0].apply(vnode,args);}} else{for(let i=0,iLen=handler.length;ioldEndIdx){before=newCh[newEndIdx+1]==null?null:newCh[newEndIdx+1].elm;addVnodes(parentElm,before,newCh,newStartIdx,newEndIdx,insertedVnodeQueue);} else{removeVnodes(parentElm,oldCh,oldStartIdx,oldEndIdx);}}} function patchVnode(oldVnode,vnode,insertedVnodeQueue){let i,iLen,hook;if(isDef((i=vnode.data))&&isDef((hook=i.hook))&&isDef((i=hook.prepatch))){i(oldVnode,vnode);} const elm=(vnode.elm=oldVnode.elm);let oldCh=oldVnode.children;let ch=vnode.children;if(oldVnode===vnode) return;if(vnode.data!==undefined){for(i=0,iLen=cbs.update.length;i{})).bind(window),get localStorage(){return localStorage||window.localStorage;},set localStorage(newLocalStorage){localStorage=newLocalStorage;},};function whenReady(fn){return new Promise(function(resolve){if(document.readyState!=="loading"){resolve();} else{document.addEventListener("DOMContentLoaded",resolve,false);}}).then(fn||function(){});} const loadedScripts={};function loadJS(url){if(url in loadedScripts){return loadedScripts[url];} const promise=new Promise(function(resolve,reject){const script=document.createElement("script");script.type="text/javascript";script.src=url;script.onload=function(){resolve();};script.onerror=function(){reject(`Error loading file '${url}'`);};const head=document.head||document.getElementsByTagName("head")[0];head.appendChild(script);});loadedScripts[url]=promise;return promise;} async function loadFile(url){const result=await browser.fetch(url);if(!result.ok){throw new Error("Error while fetching xml templates");} return await result.text();} function escape(str){if(str===undefined){return"";} if(typeof str==="number"){return String(str);} const p=document.createElement("p");p.textContent=str;return p.innerHTML;} function debounce(func,wait,immediate){let timeout;return function(){const context=this;const args=arguments;function later(){timeout=null;if(!immediate){func.apply(context,args);}} const callNow=immediate&&!timeout;browser.clearTimeout(timeout);timeout=browser.setTimeout(later,wait);if(callNow){func.apply(context,args);}};} function shallowEqual(p1,p2){for(let k in p1){if(p1[k]!==p2[k]){return false;}} return true;} var _utils=Object.freeze({__proto__:null,whenReady:whenReady,loadJS:loadJS,loadFile:loadFile,escape:escape,debounce:debounce,shallowEqual:shallowEqual});const TRANSLATABLE_ATTRS=["label","title","placeholder","alt"];const lineBreakRE=/[\r\n]/;const whitespaceRE=/\s+/g;const translationRE=/^(\s*)([\s\S]+?)(\s*)$/;const NODE_HOOKS_PARAMS={create:"(_, n)",insert:"vn",remove:"(vn, rm)",destroy:"()",};function isComponent(obj){return obj&&obj.hasOwnProperty("__owl__");} class VDomArray extends Array{toString(){return vDomToString(this);}} function vDomToString(vdom){return vdom.map((vnode)=>{if(vnode.sel){const node=document.createElement(vnode.sel);const result=patch(node,vnode);return result.elm.outerHTML;} else{return vnode.text;}}).join("");} const UTILS={zero:Symbol("zero"),toClassObj(expr){const result={};if(typeof expr==="string"){expr=expr.trim();if(!expr){return{};} let words=expr.split(/\s+/);for(let i=0;id1.priority-d2.priority);if(directive.extraNames){directive.extraNames.forEach((n)=>(QWeb.DIRECTIVE_NAMES[n]=1));}} static registerComponent(name,Component){if(QWeb.components[name]){throw new Error(`Component '${name}' has already been registered`);} QWeb.components[name]=Component;} static registerTemplate(name,template){if(QWeb.TEMPLATES[name]){throw new Error(`Template '${name}' has already been registered`);} const qweb=new QWeb();qweb.addTemplate(name,template);QWeb.TEMPLATES[name]=qweb.templates[name];} addTemplate(name,xmlString,allowDuplicate){if(allowDuplicate&&name in this.templates){return;} const doc=parseXML(xmlString);if(!doc.firstChild){throw new Error("Invalid template (should not be empty)");} this._addTemplate(name,doc.firstChild);} addTemplates(xmlstr){const doc=typeof xmlstr==="string"?parseXML(xmlstr):xmlstr;const templates=doc.getElementsByTagName("templates")[0];if(!templates){return;} for(let elem of templates.children){const name=elem.getAttribute("t-name");this._addTemplate(name,elem);}} _addTemplate(name,elem){if(name in this.templates){throw new Error(`Template ${name} already defined`);} this._processTemplate(elem);const template={elem,fn:function(context,extra){const compiledFunction=this._compile(name);template.fn=compiledFunction;return compiledFunction.call(this,context,extra);},};this.templates[name]=template;} _processTemplate(elem){let tbranch=elem.querySelectorAll("[t-elif], [t-else]");for(let i=0,ilen=tbranch.length;i1){throw new Error("Only one conditional branching directive is allowed per node");} let textNode;while((textNode=node.previousSibling)!==prevElem){if(textNode.nodeValue.trim().length&&textNode.nodeType!==8){throw new Error("text is not allowed between branching directives");} textNode.remove();}} else{throw new Error("t-elif and t-else directives must be preceded by a t-if or t-elif directive");}}} render(name,context={},extra=null){const template=this.templates[name];if(!template){throw new Error(`Template ${name} does not exist`);} return template.fn.call(this,context,extra);} renderToString(name,context={},extra){const vnode=this.render(name,context,extra);if(vnode.sel===undefined){return vnode.text;} const node=document.createElement(vnode.sel);const elem=patch(node,vnode).elm;function escapeTextNodes(node){if(node.nodeType===3){node.textContent=escape(node.textContent);} for(let n of node.childNodes){escapeTextNodes(n);}} escapeTextNodes(elem);return elem.outerHTML;} forceUpdate(){this.isUpdating=true;Promise.resolve().then(()=>{if(this.isUpdating){this.isUpdating=false;this.trigger("update");}});} _compile(name,options={}){const elem=options.elem||this.templates[name].elem;const isDebug=elem.attributes.hasOwnProperty("t-debug");const ctx=new CompilationContext(name);if(elem.tagName!=="t"){ctx.shouldDefineResult=false;} if(options.hasParent){ctx.variables=Object.create(null);ctx.parentNode=ctx.generateID();ctx.allowMultipleRoots=true;ctx.shouldDefineParent=true;ctx.hasParentWidget=true;ctx.shouldDefineResult=false;ctx.addLine(`let c${ctx.parentNode} = extra.parentNode;`);if(options.defineKey){ctx.addLine(`let key0 = extra.key || "";`);ctx.hasKey0=true;}} this._compileNode(elem,ctx);if(!options.hasParent){if(ctx.shouldDefineResult){ctx.addLine(`return result;`);} else{if(!ctx.rootNode){throw new Error(`A template should have one root node (${ctx.templateName})`);} ctx.addLine(`return vn${ctx.rootNode};`);}} let code=ctx.generateCode();const templateName=ctx.templateName.replace(/`/g,"'").slice(0,200);code.unshift(` // Template name: "${templateName}"`);let template;try{template=new Function("context, extra",code.join("\n"));} catch(e){console.groupCollapsed(`Invalid Code generated by ${templateName}`);console.warn(code.join("\n"));console.groupEnd();throw new Error(`Invalid generated code while compiling template '${templateName}': ${e.message}`);} if(isDebug){const tpl=this.templates[name];if(tpl){const msg=`Template: ${tpl.elem.outerHTML}\nCompiled code:\n${template.toString()}`;console.log(msg);}} return template;} _compileNode(node,ctx){if(!(node instanceof Element)){let text=node.textContent;if(!ctx.inPreTag){if(lineBreakRE.test(text)&&!text.trim()){return;} text=text.replace(whitespaceRE," ");} if(this.translateFn){if(node.parentNode.getAttribute("t-translation")!=="off"){const match=translationRE.exec(text);text=match[1]+this.translateFn(match[2])+match[3];}} if(ctx.parentNode){if(node.nodeType===3){ctx.addLine(`c${ctx.parentNode}.push({text: \`${text}\`});`);} else if(node.nodeType===8){ctx.addLine(`c${ctx.parentNode}.push(h('!', \`${text}\`));`);}} else if(ctx.parentTextNode){ctx.addLine(`vn${ctx.parentTextNode}.text += \`${text}\`;`);} else{let nodeID=ctx.generateID();ctx.addLine(`let vn${nodeID} = {text: \`${text}\`};`);ctx.addLine(`result = vn${nodeID};`);ctx.rootContext.rootNode=nodeID;ctx.rootContext.parentTextNode=nodeID;} return;} if(node.tagName!=="t"&&node.hasAttribute("t-call")){const tCallNode=document.createElement("t");tCallNode.setAttribute("t-call",node.getAttribute("t-call"));node.removeAttribute("t-call");node.prepend(tCallNode);} const firstLetter=node.tagName[0];if(firstLetter===firstLetter.toUpperCase()){node.setAttribute("t-component",node.tagName);} else if(node.tagName!=="t"&&node.hasAttribute("t-component")){throw new Error(`Directive 't-component' can only be used on nodes (used on a <${node.tagName}>)`);} const attributes=node.attributes;const validDirectives=[];const finalizers=[];for(let i=0;i {`);for(let handler of nodeHooks[hook]){ctx.addLine(` ${handler}`);} ctx.addLine(` },`);} ctx.addLine(`};`);}} if(node.nodeName==="pre"){ctx=ctx.subContext("inPreTag",true);} this._compileChildren(node,ctx);const shouldAddNS=node.nodeName==="svg"||(node.nodeName==="g"&&ctx.rootNode===ctx.parentNode);if(shouldAddNS){ctx.rootContext.shouldDefineUtils=true;ctx.addLine(`utils.addNameSpace(vn${ctx.parentNode});`);} for(let{directive,value,fullName}of finalizers){directive.finalize({node,qweb:this,ctx,fullName,value});}} _compileGenericNode(node,ctx,withHandlers=true){if(node.nodeType!==1){throw new Error("unsupported node type");} const attributes=node.attributes;const attrs=[];const props=[];const tattrs=[];function handleProperties(key,val){let isProp=false;switch(node.nodeName){case"input":let type=node.getAttribute("type");if(type==="checkbox"||type==="radio"){if(key==="checked"||key==="indeterminate"){isProp=true;}} if(key==="value"||key==="readonly"||key==="disabled"){isProp=true;} break;case"option":isProp=key==="selected"||key==="disabled";break;case"textarea":isProp=key==="readonly"||key==="disabled"||key==="value";break;case"select":isProp=key==="disabled"||key==="value";break;case"button":case"optgroup":isProp=key==="disabled";break;} if(isProp){props.push(`${key}: ${val}`);}} let classObj="";for(let i=0;i`'${escapeQuotes(a)}':true`).join(",");if(classObj){ctx.addLine(`Object.assign(${classObj}, {${classDef}})`);} else{classObj=`_${ctx.generateID()}`;ctx.addLine(`let ${classObj} = {${classDef}};`);}}} else{ctx.addLine(`let _${attID} = '${escapeQuotes(value)}';`);if(!name.match(/^[a-zA-Z]+$/)){name='"'+name+'"';} attrs.push(`${name}: _${attID}`);handleProperties(name,`_${attID}`);}} if(name.startsWith("t-att-")){let attName=name.slice(6);const v=ctx.getValue(value);let formattedValue=typeof v==="string"?ctx.formatExpression(v):`scope.${v.id}`;if(attName==="class"){ctx.rootContext.shouldDefineUtils=true;formattedValue=`utils.toClassObj(${formattedValue})`;if(classObj){ctx.addLine(`Object.assign(${classObj}, ${formattedValue})`);} else{classObj=`_${ctx.generateID()}`;ctx.addLine(`let ${classObj} = ${formattedValue};`);}} else{const attID=ctx.generateID();if(!attName.match(/^[a-zA-Z]+$/)){attName='"'+attName+'"';} const attValue=node.getAttribute(attName);if(attValue){const attValueID=ctx.generateID();ctx.addLine(`let _${attValueID} = ${formattedValue};`);formattedValue=`'${attValue}' + (_${attValueID} ? ' ' + _${attValueID} : '')`;const attrIndex=attrs.findIndex((att)=>att.startsWith(attName+":"));attrs.splice(attrIndex,1);} if(node.nodeName==="select"&&attName==="value"){attrs.push(`${attName}: ${v}`);handleProperties(attName,v);} else{ctx.addLine(`let _${attID} = ${formattedValue};`);attrs.push(`${attName}: _${attID}`);handleProperties(attName,"_"+attID);}}} if(name.startsWith("t-attf-")){let attName=name.slice(7);if(!attName.match(/^[a-zA-Z]+$/)){attName='"'+attName+'"';} const formattedExpr=ctx.interpolate(value);const attID=ctx.generateID();let staticVal=node.getAttribute(attName);if(staticVal){ctx.addLine(`let _${attID} = '${staticVal} ' + ${formattedExpr};`);} else{ctx.addLine(`let _${attID} = ${formattedExpr};`);} attrs.push(`${attName}: _${attID}`);} if(name==="t-att"){let id=ctx.generateID();ctx.addLine(`let _${id} = ${ctx.formatExpression(value)};`);tattrs.push(id);}} let nodeID=ctx.generateID();let key=ctx.loopNumber||ctx.hasKey0?`\`\${key${ctx.loopNumber}}_${nodeID}\``:nodeID;const parts=[`key:${key}`];if(attrs.length+tattrs.length>0){parts.push(`attrs:{${attrs.join(",")}}`);} if(props.length>0){parts.push(`props:{${props.join(",")}}`);} if(classObj){parts.push(`class:${classObj}`);} if(withHandlers){parts.push(`on:{}`);} ctx.addLine(`let c${nodeID} = [], p${nodeID} = {${parts.join(",")}};`);for(let id of tattrs){ctx.addIf(`_${id} instanceof Array`);ctx.addLine(`p${nodeID}.attrs[_${id}[0]] = _${id}[1];`);ctx.addElse();ctx.addLine(`for (let key in _${id}) {`);ctx.indent();ctx.addLine(`p${nodeID}.attrs[key] = _${id}[key];`);ctx.dedent();ctx.addLine(`}`);ctx.closeIf();} let nodeName=`'${node.nodeName}'`;if(node.hasAttribute("t-tag")){const tagExpr=node.getAttribute("t-tag");node.removeAttribute("t-tag");nodeName=`tag${ctx.generateID()}`;ctx.addLine(`let ${nodeName} = ${ctx.formatExpression(tagExpr)};`);} ctx.addLine(`let vn${nodeID} = h(${nodeName}, p${nodeID}, c${nodeID});`);if(ctx.parentNode){ctx.addLine(`c${ctx.parentNode}.push(vn${nodeID});`);} else if(ctx.loopNumber||ctx.hasKey0){ctx.rootContext.shouldDefineResult=true;ctx.addLine(`result = vn${nodeID};`);} return nodeID;} _compileChildren(node,ctx){if(node.childNodes.length>0){for(let child of Array.from(node.childNodes)){this._compileNode(child,ctx);}}}} QWeb.utils=UTILS;QWeb.components=Object.create(null);QWeb.DIRECTIVE_NAMES={name:1,att:1,attf:1,translation:1,tag:1,};QWeb.DIRECTIVES=[];QWeb.TEMPLATES={};QWeb.nextId=1;QWeb.dev=false;QWeb.enableTransitions=true;QWeb.slots={};QWeb.nextSlotId=1;QWeb.subTemplates={};const parser=new DOMParser();function htmlToVDOM(html){const doc=parser.parseFromString(html,"text/html");const result=[];for(let child of doc.body.childNodes){result.push(htmlToVNode(child));} return result;} function htmlToVNode(node){if(!(node instanceof Element)){if(node instanceof Comment){return h("!",node.textContent);} return{text:node.textContent};} const attrs={};for(let attr of node.attributes){attrs[attr.name]=attr.textContent;} const children=[];for(let c of node.childNodes){children.push(htmlToVNode(c));} const vnode=h(node.tagName,{attrs},children);if(vnode.sel==="svg"){addNS(vnode.data,vnode.children,vnode.sel);} return vnode;} QWeb.utils.htmlToVDOM=htmlToVDOM;function compileValueNode(value,node,qweb,ctx){ctx.rootContext.shouldDefineScope=true;if(value==="0"){if(ctx.parentNode){ctx.rootContext.shouldDefineUtils=true;const zeroArgs=ctx.escaping?`{text: utils.vDomToString(scope[utils.zero])}`:`...scope[utils.zero]`;ctx.addLine(`c${ctx.parentNode}.push(${zeroArgs});`);} return;} let exprID;if(typeof value==="string"){exprID=`_${ctx.generateID()}`;ctx.addLine(`let ${exprID} = ${ctx.formatExpression(value)};`);} else{exprID=`scope.${value.id}`;} ctx.addIf(`${exprID} != null`);if(ctx.escaping){let protectID;if(value.hasBody){ctx.rootContext.shouldDefineUtils=true;protectID=ctx.startProtectScope();ctx.addLine(`${exprID} = ${exprID} instanceof utils.VDomArray ? utils.vDomToString(${exprID}) : ${exprID};`);} if(ctx.parentTextNode){ctx.addLine(`vn${ctx.parentTextNode}.text += ${exprID};`);} else if(ctx.parentNode){ctx.addLine(`c${ctx.parentNode}.push({text: ${exprID}});`);} else{let nodeID=ctx.generateID();ctx.rootContext.rootNode=nodeID;ctx.rootContext.parentTextNode=nodeID;ctx.addLine(`let vn${nodeID} = {text: ${exprID}};`);if(ctx.rootContext.shouldDefineResult){ctx.addLine(`result = vn${nodeID}`);}} if(value.hasBody){ctx.stopProtectScope(protectID);}} else{ctx.rootContext.shouldDefineUtils=true;if(value.hasBody){ctx.addLine(`const vnodeArray = ${exprID} instanceof utils.VDomArray ? ${exprID} : utils.htmlToVDOM(${exprID});`);ctx.addLine(`c${ctx.parentNode}.push(...vnodeArray);`);} else{ctx.addLine(`c${ctx.parentNode}.push(...utils.htmlToVDOM(${exprID}));`);}} if(node.childNodes.length){ctx.addElse();qweb._compileChildren(node,ctx);} ctx.closeIf();} QWeb.addDirective({name:"esc",priority:70,atNodeEncounter({node,qweb,ctx}){let value=ctx.getValue(node.getAttribute("t-esc"));compileValueNode(value,node,qweb,ctx.subContext("escaping",true));return true;},});QWeb.addDirective({name:"raw",priority:80,atNodeEncounter({node,qweb,ctx}){let value=ctx.getValue(node.getAttribute("t-raw"));compileValueNode(value,node,qweb,ctx);return true;},});QWeb.addDirective({name:"set",extraNames:["value"],priority:60,atNodeEncounter({node,qweb,ctx}){ctx.rootContext.shouldDefineScope=true;const variable=node.getAttribute("t-set");let value=node.getAttribute("t-value");ctx.variables[variable]=ctx.variables[variable]||{};let qwebvar=ctx.variables[variable];const hasBody=node.hasChildNodes();qwebvar.id=variable;qwebvar.expr=`scope.${variable}`;if(value){const formattedValue=ctx.formatExpression(value);let scopeExpr=`scope`;if(ctx.protectedScopeNumber){ctx.rootContext.shouldDefineUtils=true;scopeExpr=`utils.getScope(scope, '${variable}')`;} ctx.addLine(`${scopeExpr}.${variable} = ${formattedValue};`);qwebvar.value=formattedValue;} if(hasBody){ctx.rootContext.shouldDefineUtils=true;if(value){ctx.addIf(`!(${qwebvar.expr})`);} const tempParentNodeID=ctx.generateID();const _parentNode=ctx.parentNode;ctx.parentNode=tempParentNodeID;ctx.addLine(`let c${tempParentNodeID} = new utils.VDomArray();`);const nodeCopy=node.cloneNode(true);for(let attr of["t-set","t-value","t-if","t-else","t-elif"]){nodeCopy.removeAttribute(attr);} qweb._compileNode(nodeCopy,ctx);ctx.addLine(`${qwebvar.expr} = c${tempParentNodeID}`);qwebvar.value=`c${tempParentNodeID}`;qwebvar.hasBody=true;ctx.parentNode=_parentNode;if(value){ctx.closeIf();}} return true;},});QWeb.addDirective({name:"if",priority:20,atNodeEncounter({node,ctx}){let cond=ctx.getValue(node.getAttribute("t-if"));ctx.addIf(typeof cond==="string"?ctx.formatExpression(cond):`scope.${cond.id}`);return false;},finalize({ctx}){ctx.closeIf();},});QWeb.addDirective({name:"elif",priority:30,atNodeEncounter({node,ctx}){let cond=ctx.getValue(node.getAttribute("t-elif"));ctx.addLine(`else if (${typeof cond === "string" ? ctx.formatExpression(cond) : `scope.${cond.id}`}) {`);ctx.indent();return false;},finalize({ctx}){ctx.closeIf();},});QWeb.addDirective({name:"else",priority:40,atNodeEncounter({ctx}){ctx.addLine(`else {`);ctx.indent();return false;},finalize({ctx}){ctx.closeIf();},});QWeb.addDirective({name:"call",priority:50,atNodeEncounter({node,qweb,ctx}){ctx.rootContext.shouldDefineScope=true;ctx.rootContext.shouldDefineUtils=true;const subTemplate=node.getAttribute("t-call");const isDynamic=INTERP_REGEXP.test(subTemplate);const nodeTemplate=qweb.templates[subTemplate];if(!isDynamic&&!nodeTemplate){throw new Error(`Cannot find template "${subTemplate}" (t-call)`);} let subIdstr;if(isDynamic){const _id=ctx.generateID();ctx.addLine(`let tname${_id} = ${ctx.interpolate(subTemplate)};`);ctx.addLine(`let tid${_id} = this.subTemplates[tname${_id}];`);ctx.addIf(`!tid${_id}`);ctx.addLine(`tid${_id} = this.constructor.nextId++;`);ctx.addLine(`this.subTemplates[tname${_id}] = tid${_id};`);ctx.addLine(`this.constructor.subTemplates[tid${_id}] = this._compile(tname${_id}, {hasParent: true, defineKey: true});`);ctx.closeIf();subIdstr=`tid${_id}`;} else{let subId=qweb.subTemplates[subTemplate];if(!subId){subId=QWeb.nextId++;qweb.subTemplates[subTemplate]=subId;const subTemplateFn=qweb._compile(subTemplate,{hasParent:true,defineKey:true});QWeb.subTemplates[subId]=subTemplateFn;} subIdstr=`'${subId}'`;} let hasBody=node.hasChildNodes();const protectID=ctx.startProtectScope();if(hasBody){ctx.addLine(`{`);ctx.indent();const nodeCopy=node.cloneNode(true);for(let attr of["t-if","t-else","t-elif","t-call"]){nodeCopy.removeAttribute(attr);} ctx.addLine(`{`);ctx.indent();ctx.addLine("let c__0 = [];");qweb._compileNode(nodeCopy,ctx.subContext("parentNode","__0"));ctx.rootContext.shouldDefineUtils=true;ctx.addLine("scope[utils.zero] = c__0;");ctx.dedent();ctx.addLine(`}`);} const parentComponent=ctx.rootContext.shouldDefineParent?`parent`:`utils.getComponent(context)`;const key=ctx.generateTemplateKey();const parentNode=ctx.parentNode?`c${ctx.parentNode}`:"result";const extra=`Object.assign({}, extra, {parentNode: ${parentNode}, parent: ${parentComponent}, key: ${key}})`;if(ctx.parentNode){ctx.addLine(`this.constructor.subTemplates[${subIdstr}].call(this, scope, ${extra});`);} else{ctx.rootContext.shouldDefineResult=true;ctx.addLine(`result = []`);ctx.addLine(`this.constructor.subTemplates[${subIdstr}].call(this, scope, ${extra});`);ctx.addLine(`result = result[0]`);} if(hasBody){ctx.dedent();ctx.addLine(`}`);} ctx.stopProtectScope(protectID);return true;},});QWeb.addDirective({name:"foreach",extraNames:["as"],priority:10,atNodeEncounter({node,qweb,ctx}){ctx.rootContext.shouldDefineScope=true;ctx=ctx.subContext("loopNumber",ctx.loopNumber+1);const elems=node.getAttribute("t-foreach");const name=node.getAttribute("t-as");let arrayID=ctx.generateID();ctx.addLine(`let _${arrayID} = ${ctx.formatExpression(elems)};`);ctx.addLine(`if (!_${arrayID}) { throw new Error('QWeb error: Invalid loop expression')}`);let keysID=ctx.generateID();let valuesID=ctx.generateID();ctx.addLine(`let _${keysID} = _${valuesID} = _${arrayID};`);ctx.addIf(`!(_${arrayID} instanceof Array)`);ctx.addLine(`_${keysID} = Object.keys(_${arrayID});`);ctx.addLine(`_${valuesID} = Object.values(_${arrayID});`);ctx.closeIf();ctx.addLine(`let _length${keysID} = _${keysID}.length;`);let varsID=ctx.startProtectScope(true);const loopVar=`i${ctx.loopNumber}`;ctx.addLine(`for (let ${loopVar} = 0; ${loopVar} < _length${keysID}; ${loopVar}++) {`);ctx.indent();ctx.addLine(`scope.${name}_first = ${loopVar} === 0`);ctx.addLine(`scope.${name}_last = ${loopVar} === _length${keysID} - 1`);ctx.addLine(`scope.${name}_index = ${loopVar}`);ctx.addLine(`scope.${name} = _${keysID}[${loopVar}]`);ctx.addLine(`scope.${name}_value = _${valuesID}[${loopVar}]`);const nodeCopy=node.cloneNode(true);let shouldWarn=!nodeCopy.hasAttribute("t-key")&&node.children.length===1&&node.children[0].tagName!=="t"&&!node.children[0].hasAttribute("t-key");if(shouldWarn){console.warn(`Directive t-foreach should always be used with a t-key! (in template: '${ctx.templateName}')`);} if(nodeCopy.hasAttribute("t-key")){const expr=ctx.formatExpression(nodeCopy.getAttribute("t-key"));ctx.addLine(`let key${ctx.loopNumber} = ${expr};`);nodeCopy.removeAttribute("t-key");} else{ctx.addLine(`let key${ctx.loopNumber} = i${ctx.loopNumber};`);} nodeCopy.removeAttribute("t-foreach");qweb._compileNode(nodeCopy,ctx);ctx.dedent();ctx.addLine("}");ctx.stopProtectScope(varsID);return true;},});QWeb.addDirective({name:"debug",priority:1,atNodeEncounter({ctx}){ctx.addLine("debugger;");},});QWeb.addDirective({name:"log",priority:1,atNodeEncounter({ctx,value}){const expr=ctx.formatExpression(value);ctx.addLine(`console.log(${expr})`);},});const MODS_CODE={prevent:"e.preventDefault();",self:"if (e.target !== this.elm) {return}",stop:"e.stopPropagation();",};const FNAMEREGEXP=/^[$A-Z_][0-9A-Z_$]*$/i;function makeHandlerCode(ctx,fullName,value,putInCache,modcodes=MODS_CODE){let[event,...mods]=fullName.slice(5).split(".");if(mods.includes("capture")){event="!"+event;} if(!event){throw new Error("Missing event name with t-on directive");} let code;let args="";const name=value.replace(/\(.*\)/,function(_args){args=_args.slice(1,-1);return"";});const isMethodCall=name.match(FNAMEREGEXP);if(isMethodCall){ctx.rootContext.shouldDefineUtils=true;const comp=`utils.getComponent(context)`;if(args){const argId=ctx.generateID();ctx.addLine(`let args${argId} = [${ctx.formatExpression(args)}];`);code=`${comp}['${name}'](...args${argId}, e);`;putInCache=false;} else{code=`${comp}['${name}'](e);`;}} else{putInCache=false;code=ctx.captureExpression(value);code=`const res = (() => { return ${code} })(); if (typeof res === 'function') { res(e) }`;} const modCode=mods.map((mod)=>modcodes[mod]).join("");let handler=`function (e) {if (context.__owl__.status === ${5 /* DESTROYED */}){return}${modCode}${code}}`;if(putInCache){const key=ctx.generateTemplateKey(event);ctx.addLine(`extra.handlers[${key}] = extra.handlers[${key}] || ${handler};`);handler=`extra.handlers[${key}]`;} return{event,handler};} QWeb.addDirective({name:"on",priority:90,atNodeCreation({ctx,fullName,value,nodeID}){const{event,handler}=makeHandlerCode(ctx,fullName,value,true);ctx.addLine(`p${nodeID}.on['${event}'] = ${handler};`);},});QWeb.addDirective({name:"ref",priority:95,atNodeCreation({ctx,value,addNodeHook}){ctx.rootContext.shouldDefineRefs=true;const refKey=`ref${ctx.generateID()}`;ctx.addLine(`const ${refKey} = ${ctx.interpolate(value)};`);addNodeHook("create",`context.__owl__.refs[${refKey}] = n.elm;`);addNodeHook("destroy",`delete context.__owl__.refs[${refKey}];`);},});QWeb.utils.nextFrame=function(cb){requestAnimationFrame(()=>requestAnimationFrame(cb));};QWeb.utils.transitionInsert=function(vn,name){const elm=vn.elm;const dup=elm.parentElement&&elm.parentElement.querySelector(`*[data-owl-key='${vn.key}']`);if(dup){dup.remove();} elm.classList.add(name+"-enter");elm.classList.add(name+"-enter-active");elm.classList.remove(name+"-leave-active");elm.classList.remove(name+"-leave-to");const finalize=()=>{elm.classList.remove(name+"-enter-active");elm.classList.remove(name+"-enter-to");};this.nextFrame(()=>{elm.classList.remove(name+"-enter");elm.classList.add(name+"-enter-to");whenTransitionEnd(elm,finalize);});};QWeb.utils.transitionRemove=function(vn,name,rm){const elm=vn.elm;elm.setAttribute("data-owl-key",vn.key);elm.classList.add(name+"-leave");elm.classList.add(name+"-leave-active");const finalize=()=>{if(!elm.classList.contains(name+"-leave-active")){return;} elm.classList.remove(name+"-leave-active");elm.classList.remove(name+"-leave-to");rm();};this.nextFrame(()=>{elm.classList.remove(name+"-leave");elm.classList.add(name+"-leave-to");whenTransitionEnd(elm,finalize);});};function getTimeout(delays,durations){while(delays.length{return toMs(d)+toMs(delays[i]);}));} function toMs(s){return Number(s.slice(0,-1).replace(",","."))*1000;} function whenTransitionEnd(elm,cb){if(!elm.parentNode){return;} const styles=window.getComputedStyle(elm);const delays=(styles.transitionDelay||"").split(", ");const durations=(styles.transitionDuration||"").split(", ");const timeout=getTimeout(delays,durations);if(timeout>0){const transitionEndCB=()=>{if(!elm.parentNode) return;cb();browser.clearTimeout(fallbackTimeout);elm.removeEventListener("transitionend",transitionEndCB);};elm.addEventListener("transitionend",transitionEndCB,{once:true});const fallbackTimeout=browser.setTimeout(transitionEndCB,timeout+1);} else{cb();}} QWeb.addDirective({name:"transition",priority:96,atNodeCreation({ctx,value,addNodeHook}){if(!QWeb.enableTransitions){return;} ctx.rootContext.shouldDefineUtils=true;let name=value;const hooks={insert:`utils.transitionInsert(vn, '${name}');`,remove:`utils.transitionRemove(vn, '${name}', rm);`,};for(let hookName in hooks){addNodeHook(hookName,hooks[hookName]);}},});QWeb.addDirective({name:"slot",priority:80,atNodeEncounter({ctx,value,node,qweb}){const slotKey=ctx.generateID();const valueExpr=value.match(INTERP_REGEXP)?ctx.interpolate(value):`'${value}'`;ctx.addLine(`const slot${slotKey} = this.constructor.slots[context.__owl__.slotId + '_' + ${valueExpr}];`);ctx.addIf(`slot${slotKey}`);let parentNode=`c${ctx.parentNode}`;if(!ctx.parentNode){ctx.rootContext.shouldDefineResult=true;ctx.rootContext.shouldDefineUtils=true;parentNode=`children${ctx.generateID()}`;ctx.addLine(`let ${parentNode}= []`);ctx.addLine(`result = {}`);} ctx.addLine(`slot${slotKey}.call(this, context.__owl__.scope, Object.assign({}, extra, {parentNode: ${parentNode}, parent: extra.parent || context}));`);if(!ctx.parentNode){ctx.addLine(`utils.defineProxy(result, ${parentNode}[0]);`);} if(node.hasChildNodes()){ctx.addElse();const nodeCopy=node.cloneNode(true);nodeCopy.removeAttribute("t-slot");qweb._compileNode(nodeCopy,ctx);} ctx.closeIf();return true;},});QWeb.utils.toNumber=function(val){const n=parseFloat(val);return isNaN(n)?val:n;};const hasDotAtTheEnd=/\.[\w_]+\s*$/;const hasBracketsAtTheEnd=/\[[^\[]+\]\s*$/;QWeb.addDirective({name:"model",priority:42,atNodeCreation({ctx,nodeID,value,node,fullName,addNodeHook}){const type=node.getAttribute("type");let handler;let event=fullName.includes(".lazy")?"change":"input";let expr;let baseExpr;if(hasDotAtTheEnd.test(value)){const index=value.lastIndexOf(".");baseExpr=value.slice(0,index);ctx.addLine(`let expr${nodeID} = ${ctx.formatExpression(baseExpr)};`);expr=`expr${nodeID}${value.slice(index)}`;} else if(hasBracketsAtTheEnd.test(value)){const index=value.lastIndexOf("[");baseExpr=value.slice(0,index);ctx.addLine(`let expr${nodeID} = ${ctx.formatExpression(baseExpr)};`);let exprKey=value.trimRight().slice(index+1,-1);ctx.addLine(`let exprKey${nodeID} = ${ctx.formatExpression(exprKey)};`);expr=`expr${nodeID}[exprKey${nodeID}]`;} else{throw new Error(`Invalid t-model expression: "${value}" (it should be assignable)`);} const key=ctx.generateTemplateKey();if(node.tagName==="select"){ctx.addLine(`p${nodeID}.props = {value: ${expr}};`);addNodeHook("create",`n.elm.value=${expr};`);event="change";handler=`(ev) => {${expr} = ev.target.value}`;} else if(type==="checkbox"){ctx.addLine(`p${nodeID}.props = {checked: ${expr}};`);handler=`(ev) => {${expr} = ev.target.checked}`;} else if(type==="radio"){const nodeValue=node.getAttribute("value");ctx.addLine(`p${nodeID}.props = {checked:${expr} === '${nodeValue}'};`);handler=`(ev) => {${expr} = ev.target.value}`;event="click";} else{ctx.addLine(`p${nodeID}.props = {value: ${expr}};`);const trimCode=fullName.includes(".trim")?".trim()":"";let valueCode=`ev.target.value${trimCode}`;if(fullName.includes(".number")){ctx.rootContext.shouldDefineUtils=true;valueCode=`utils.toNumber(${valueCode})`;} handler=`(ev) => {${expr} = ${valueCode}}`;} ctx.addLine(`extra.handlers[${key}] = extra.handlers[${key}] || (${handler});`);ctx.addLine(`p${nodeID}.on['${event}'] = extra.handlers[${key}];`);},});QWeb.addDirective({name:"key",priority:45,atNodeEncounter({ctx,value,node}){if(ctx.loopNumber===0){ctx.keyStack.push(ctx.rootContext.hasKey0);ctx.rootContext.hasKey0=true;} ctx.addLine("{");ctx.indent();ctx.addLine(`let key${ctx.loopNumber} = ${ctx.formatExpression(value)};`);},finalize({ctx}){ctx.dedent();ctx.addLine("}");if(ctx.loopNumber===0){ctx.rootContext.hasKey0=ctx.keyStack.pop();}},});const config={};Object.defineProperty(config,"mode",{get(){return QWeb.dev?"dev":"prod";},set(mode){QWeb.dev=mode==="dev";if(QWeb.dev){console.info(`Owl is running in 'dev' mode. This is not suitable for production use. See https://github.com/odoo/owl/blob/master/doc/reference/config.md#mode for more information.`);} else{console.log(`Owl is now running in 'prod' mode.`);}},});Object.defineProperty(config,"enableTransitions",{get(){return QWeb.enableTransitions;},set(value){QWeb.enableTransitions=value;},});class OwlEvent extends CustomEvent{constructor(component,eventType,options){super(eventType,options);this.originalComponent=component;}} const T_COMPONENT_MODS_CODE=Object.assign({},MODS_CODE,{self:"if (e.target !== vn.elm) {return}",});QWeb.utils.defineProxy=function defineProxy(target,source){for(let k in source){Object.defineProperty(target,k,{get(){return source[k];},set(val){source[k]=val;},});}};QWeb.utils.assignHooks=function assignHooks(dataObj,hooks){if("hook"in dataObj){const hookObject=dataObj.hook;for(let name in hooks){const current=hookObject[name];const fn=hooks[name];if(current){hookObject[name]=(...args)=>{current(...args);fn(...args);};} else{hookObject[name]=fn;}}} else{dataObj.hook=hooks;}};QWeb.addDirective({name:"component",extraNames:["props"],priority:100,atNodeEncounter({ctx,value,node,qweb}){ctx.addLine(`// Component '${value}'`);ctx.rootContext.shouldDefineQWeb=true;ctx.rootContext.shouldDefineParent=true;ctx.rootContext.shouldDefineUtils=true;ctx.rootContext.shouldDefineScope=true;let hasDynamicProps=node.getAttribute("t-props")?true:false;const events=[];let transition="";const attributes=node.attributes;const props={};for(let i=0;ik+":"+props[k]).join(",");let componentID=ctx.generateID();let hasDefinedKey=false;let templateKey;if(node.tagName==="t"&&!node.hasAttribute("t-key")&&value.match(INTERP_REGEXP)){defineComponentKey();const id=ctx.generateID();ctx.addLine(`let k${id} = '___' + componentKey${componentID}`);templateKey=`k${id}`;} else{templateKey=ctx.generateTemplateKey();} let ref=node.getAttribute("t-ref");let refExpr="";let refKey="";if(ref){ctx.rootContext.shouldDefineRefs=true;refKey=`ref${ctx.generateID()}`;ctx.addLine(`const ${refKey} = ${ctx.interpolate(ref)};`);refExpr=`context.__owl__.refs[${refKey}] = w${componentID};`;} let finalizeComponentCode=`w${componentID}.destroy();`;if(ref){finalizeComponentCode+=`delete context.__owl__.refs[${refKey}];`;} if(transition){finalizeComponentCode=`let finalize = () => { ${finalizeComponentCode} }; delete w${componentID}.__owl__.transitionInserted; utils.transitionRemove(vn, '${transition}', finalize);`;} let createHook="";let classAttr=node.getAttribute("class");let tattClass=node.getAttribute("t-att-class");let styleAttr=node.getAttribute("style");let tattStyle=node.getAttribute("t-att-style");if(tattStyle){const attVar=`_${ctx.generateID()}`;ctx.addLine(`const ${attVar} = ${ctx.formatExpression(tattStyle)};`);tattStyle=attVar;} let classObj="";if(classAttr||tattClass||styleAttr||tattStyle||events.length){if(classAttr){let classDef=classAttr.trim().split(/\s+/).map((a)=>`'${a}':true`).join(",");classObj=`_${ctx.generateID()}`;ctx.addLine(`let ${classObj} = {${classDef}};`);} if(tattClass){let tattExpr=ctx.formatExpression(tattClass);if(tattExpr[0]!=="{"||tattExpr[tattExpr.length-1]!=="}"){tattExpr=`utils.toClassObj(${tattExpr})`;} if(classAttr){ctx.addLine(`Object.assign(${classObj}, ${tattExpr})`);} else{classObj=`_${ctx.generateID()}`;ctx.addLine(`let ${classObj} = ${tattExpr};`);}} let eventsCode=events.map(function([name,value]){const capture=name.match(/\.capture/);name=capture?name.replace(/\.capture/,""):name;const{event,handler}=makeHandlerCode(ctx,name,value,false,T_COMPONENT_MODS_CODE);if(capture){return`vn.elm.addEventListener('${event}', ${handler}, true);`;} return`vn.elm.addEventListener('${event}', ${handler});`;}).join("");const styleExpr=tattStyle||(styleAttr?`'${styleAttr}'`:false);const styleCode=styleExpr?`vn.elm.style = ${styleExpr};`:"";createHook=`utils.assignHooks(vnode.data, {create(_, vn){${styleCode}${eventsCode}}});`;} ctx.addLine(`let w${componentID} = ${templateKey} in parent.__owl__.cmap ? parent.__owl__.children[parent.__owl__.cmap[${templateKey}]] : false;`);let shouldProxy=!ctx.parentNode;if(shouldProxy){let id=ctx.generateID();ctx.rootContext.rootNode=id;shouldProxy=true;ctx.rootContext.shouldDefineResult=true;ctx.addLine(`let vn${id} = {};`);ctx.addLine(`result = vn${id};`);} if(hasDynamicProps){const dynamicProp=ctx.formatExpression(node.getAttribute("t-props"));ctx.addLine(`let props${componentID} = Object.assign({}, ${dynamicProp}, {${propStr}});`);} else{ctx.addLine(`let props${componentID} = {${propStr}};`);} ctx.addIf(`w${componentID} && w${componentID}.__owl__.currentFiber && !w${componentID}.__owl__.vnode`);ctx.addLine(`w${componentID}.destroy();`);ctx.addLine(`w${componentID} = false;`);ctx.closeIf();let registerCode="";if(shouldProxy){registerCode=`utils.defineProxy(vn${ctx.rootNode}, pvnode);`;} const hasSlots=node.childNodes.length;let scope=hasSlots?`utils.combine(context, scope)`:"undefined";ctx.addIf(`w${componentID}`);let styleCode="";if(tattStyle){styleCode=`.then(()=>{if (w${componentID}.__owl__.status === ${5 /* DESTROYED */}) {return};w${componentID}.el.style=${tattStyle};});`;} ctx.addLine(`w${componentID}.__updateProps(props${componentID}, extra.fiber, ${scope})${styleCode};`);ctx.addLine(`let pvnode = w${componentID}.__owl__.pvnode;`);if(registerCode){ctx.addLine(registerCode);} if(ctx.parentNode){ctx.addLine(`c${ctx.parentNode}.push(pvnode);`);} ctx.addElse();function defineComponentKey(){if(!hasDefinedKey){const interpValue=ctx.interpolate(value);ctx.addLine(`let componentKey${componentID} = ${interpValue};`);hasDefinedKey=true;}} defineComponentKey();const contextualValue=value.match(INTERP_REGEXP)?"false":ctx.formatExpression(value);ctx.addLine(`let W${componentID} = ${contextualValue} || context.constructor.components[componentKey${componentID}] || QWeb.components[componentKey${componentID}];`);ctx.addLine(`if (!W${componentID}) {throw new Error('Cannot find the definition of component "' + componentKey${componentID} + '"')}`);ctx.addLine(`w${componentID} = new W${componentID}(parent, props${componentID});`);if(transition){ctx.addLine(`const __patch${componentID} = w${componentID}.__patch;`);ctx.addLine(`w${componentID}.__patch = (t, vn) => {__patch${componentID}.call(w${componentID}, t, vn); if(!w${componentID}.__owl__.transitionInserted){w${componentID}.__owl__.transitionInserted = true;utils.transitionInsert(w${componentID}.__owl__.vnode, '${transition}');}};`);} ctx.addLine(`parent.__owl__.cmap[${templateKey}] = w${componentID}.__owl__.id;`);if(hasSlots){const clone=node.cloneNode(true);for(let node of clone.children){if(node.hasAttribute("t-set")&&node.hasChildNodes()){node.setAttribute("t-set-slot",node.getAttribute("t-set"));node.removeAttribute("t-set");}} const slotNodes=Array.from(clone.querySelectorAll("[t-set-slot]"));const slotNames=new Set();const slotId=QWeb.nextSlotId++;ctx.addLine(`w${componentID}.__owl__.slotId = ${slotId};`);if(slotNodes.length){for(let i=0,length=slotNodes.length;i { const vnode = fiber.vnode; pvnode.sel = vnode.sel; ${createHook}});`);const insertHook=refExpr?`insert(vn) {${refExpr}},`:"";ctx.addLine(`let pvnode = h('dummy', {key: ${templateKey}, hook: {${insertHook}remove() {},destroy(vn) {${finalizeComponentCode}}}});`);if(registerCode){ctx.addLine(registerCode);} if(ctx.parentNode){ctx.addLine(`c${ctx.parentNode}.push(pvnode);`);} ctx.addLine(`w${componentID}.__owl__.pvnode = pvnode;`);ctx.closeIf();if(classObj){ctx.addLine(`w${componentID}.__owl__.classObj=${classObj};`);} ctx.addLine(`w${componentID}.__owl__.parentLastFiberId = extra.fiber.id;`);return true;},});class Scheduler{constructor(requestAnimationFrame){this.tasks=[];this.isRunning=false;this.requestAnimationFrame=requestAnimationFrame;} start(){this.isRunning=true;this.scheduleTasks();} stop(){this.isRunning=false;} addFiber(fiber){fiber=fiber.root;return new Promise((resolve,reject)=>{if(fiber.error){return reject(fiber.error);} this.tasks.push({fiber,callback:()=>{if(fiber.error){return reject(fiber.error);} resolve();},});if(!this.isRunning){this.start();}});} rejectFiber(fiber,reason){fiber=fiber.root;const index=this.tasks.findIndex((t)=>t.fiber===fiber);if(index>=0){const[task]=this.tasks.splice(index,1);fiber.cancel();fiber.error=new Error(reason);task.callback();}} flush(){let tasks=this.tasks;this.tasks=[];tasks=tasks.filter((task)=>{if(task.fiber.isCompleted){task.callback();return false;} if(task.fiber.counter===0){if(!task.fiber.error){try{task.fiber.complete();} catch(e){task.fiber.handleError(e);}} task.callback();return false;} return true;});this.tasks=tasks.concat(this.tasks);if(this.tasks.length===0){this.stop();}} scheduleTasks(){this.requestAnimationFrame(()=>{this.flush();if(this.isRunning){this.scheduleTasks();}});}} const scheduler=new Scheduler(browser.requestAnimationFrame);class Fiber{constructor(parent,component,force,target,position){this.id=Fiber.nextId++;this.isCompleted=false;this.shouldPatch=true;this.isRendered=false;this.counter=0;this.vnode=null;this.child=null;this.sibling=null;this.lastChild=null;this.parent=null;this.component=component;this.force=force;this.target=target;this.position=position;const __owl__=component.__owl__;this.scope=__owl__.scope;this.root=parent?parent.root:this;this.parent=parent;let oldFiber=__owl__.currentFiber;if(oldFiber&&!oldFiber.isCompleted){this.force=true;if(oldFiber.root===oldFiber&&!parent){this._reuseFiber(oldFiber);return oldFiber;} else{this._remapFiber(oldFiber);}} this.root.counter++;__owl__.currentFiber=this;} _reuseFiber(oldFiber){oldFiber.cancel();oldFiber.target=this.target||oldFiber.target;oldFiber.position=this.position||oldFiber.position;oldFiber.isCompleted=false;oldFiber.isRendered=false;if(oldFiber.child){oldFiber.child.parent=null;oldFiber.child=null;oldFiber.lastChild=null;} oldFiber.counter=1;oldFiber.id=Fiber.nextId++;} _remapFiber(oldFiber){oldFiber.cancel();this.shouldPatch=oldFiber.shouldPatch;if(oldFiber===oldFiber.root){oldFiber.counter++;} if(oldFiber.parent&&!this.parent){this.parent=oldFiber.parent;this.root=this.parent.root;this.sibling=oldFiber.sibling;if(this.parent.lastChild===oldFiber){this.parent.lastChild=this;} if(this.parent.child===oldFiber){this.parent.child=this;} else{let current=this.parent.child;while(true){if(current.sibling===oldFiber){current.sibling=this;break;} current=current.sibling;}}}} _walk(doWork){let root=this;let current=this;while(true){const child=doWork(current);if(child){current=child;continue;} if(current===root){return;} while(!current.sibling){if(!current.parent||current.parent===root){return;} current=current.parent;} current=current.sibling;}} complete(){let component=this.component;this.isCompleted=true;const status=component.__owl__.status;if(status===5){return;} const patchQueue=[];const doWork=function(f){patchQueue.push(f);return f.child;};this._walk(doWork);const patchLen=patchQueue.length;if(status===3){for(let i=0;i=0;i--){const fiber=patchQueue[i];component=fiber.component;if(fiber.target&&i===0){let target;if(fiber.position==="self"){target=fiber.target;if(target.tagName.toLowerCase()!==fiber.vnode.sel){throw new Error(`Cannot attach '${component.constructor.name}' to target node (not same tag name)`);} const selfVnodeData=fiber.vnode.data?{key:fiber.vnode.data.key}:{};const selfVnode=h(fiber.vnode.sel,selfVnodeData);selfVnode.elm=target;target=selfVnode;} else{target=component.__owl__.vnode||document.createElement(fiber.vnode.sel);} component.__patch(target,fiber.vnode);} else{if(fiber.shouldPatch){component.__patch(component.__owl__.vnode,fiber.vnode);if(component.__owl__.pvnode){component.__owl__.pvnode.elm=component.__owl__.vnode.elm;}} else{component.__patch(document.createElement(fiber.vnode.sel),fiber.vnode);component.__owl__.pvnode.elm=component.__owl__.vnode.elm;}} const compOwl=component.__owl__;if(fiber===compOwl.currentFiber){compOwl.currentFiber=null;}} let inDOM=false;if(this.target){switch(this.position){case"first-child":this.target.prepend(this.component.el);break;case"last-child":this.target.appendChild(this.component.el);break;} inDOM=document.body.contains(this.component.el);this.component.env.qweb.trigger("dom-appended");} if(status===3||inDOM){for(let i=patchLen-1;i>=0;i--){const fiber=patchQueue[i];component=fiber.component;if(fiber.shouldPatch&&!this.target){component.patched();if(component.__owl__.patchedCB){component.__owl__.patchedCB();}} else{component.__callMounted();}}} else{for(let i=patchLen-1;i>=0;i--){const fiber=patchQueue[i];component=fiber.component;component.__owl__.status=4;}}} cancel(){this._walk((f)=>{if(!f.isRendered){f.root.counter--;} f.isCompleted=true;return f.child;});} handleError(error){let component=this.component;this.vnode=component.__owl__.vnode||h("div");const qweb=component.env.qweb;let root=component;function handle(error){let canCatch=false;qweb.trigger("error",error);while(component&&!(canCatch=!!component.catchError)){root=component;component=component.__owl__.parent;} if(canCatch){try{component.catchError(error);} catch(e){root=component;component=component.__owl__.parent;return handle(e);} return true;} return false;} let isHandled=handle(error);if(!isHandled){this.root.counter=0;this.root.error=error;scheduler.flush();try{root.destroy();} catch(e){}}}} Fiber.nextId=1;QWeb.utils.validateProps=function(Widget,props){const propsDef=Widget.props;if(propsDef instanceof Array){for(let i=0,l=propsDef.length;is.trim());const selectorStack=[];const parts=[];let rules=[];function generateSelector(stackIndex,parentSelector){const parts=[];for(const selector of selectorStack[stackIndex]){let part=(parentSelector&&parentSelector+" "+selector)||selector;if(part.includes("&")){part=selector.replace(/&/g,parentSelector||"");} if(stackIndex{switch(this.__owl__.status){case 3:this.render(true);break;case 5:this.env.qweb.off("update",this);break;}});depth=0;} const qweb=this.env.qweb;const template=constr.template||this.__getTemplate(qweb);this.__owl__={id:id,depth:depth,vnode:null,pvnode:null,status:0,parent:parent||null,children:{},cmap:{},currentFiber:null,parentLastFiberId:0,boundHandlers:{},mountedCB:null,willUnmountCB:null,willPatchCB:null,patchedCB:null,willStartCB:null,willUpdatePropsCB:null,observer:null,renderFn:qweb.render.bind(qweb,template),classObj:null,refs:null,scope:null,};if(constr.style){this.__applyStyles(constr);} this.setup();} get el(){return this.__owl__.vnode?this.__owl__.vnode.elm:null;} setup(){} async willStart(){} mounted(){} async willUpdateProps(nextProps){} willPatch(){} patched(){} willUnmount(){} async mount(target,options={}){if(!(target instanceof HTMLElement||target instanceof DocumentFragment)){let message=`Component '${this.constructor.name}' cannot be mounted: the target is not a valid DOM node.`;message+=`\nMaybe the DOM is not ready yet? (in that case, you can use owl.utils.whenReady)`;throw new Error(message);} const position=options.position||"last-child";const __owl__=this.__owl__;const currentFiber=__owl__.currentFiber;switch(__owl__.status){case 0:{const fiber=new Fiber(null,this,true,target,position);fiber.shouldPatch=false;this.__prepareAndRender(fiber,()=>{});return scheduler.addFiber(fiber);} case 1:case 2:currentFiber.target=target;currentFiber.position=position;return scheduler.addFiber(currentFiber);case 4:{const fiber=new Fiber(null,this,true,target,position);fiber.shouldPatch=false;this.__render(fiber);return scheduler.addFiber(fiber);} case 3:{if(position!=="self"&&this.el.parentNode!==target){const fiber=new Fiber(null,this,true,target,position);fiber.shouldPatch=false;this.__render(fiber);return scheduler.addFiber(fiber);} else{return Promise.resolve();}} case 5:throw new Error("Cannot mount a destroyed component");}} unmount(){if(this.__owl__.status===3){this.__callWillUnmount();this.el.remove();}} async render(force=false){const __owl__=this.__owl__;const currentFiber=__owl__.currentFiber;if(!__owl__.vnode&&!currentFiber){return;} if(currentFiber&&!currentFiber.isRendered&&!currentFiber.isCompleted){return scheduler.addFiber(currentFiber.root);} const status=__owl__.status;const fiber=new Fiber(null,this,force,null,null);Promise.resolve().then(()=>{if(__owl__.status===3||status!==3){if(fiber.isCompleted||fiber.isRendered){return;} this.__render(fiber);} else{fiber.isCompleted=true;__owl__.currentFiber=null;}});return scheduler.addFiber(fiber);} destroy(){const __owl__=this.__owl__;if(__owl__.status!==5){const el=this.el;this.__destroy(__owl__.parent);if(el){el.remove();}}} shouldUpdate(nextProps){return true;} trigger(eventType,payload){this.__trigger(this,eventType,payload);} __destroy(parent){const __owl__=this.__owl__;if(__owl__.status===3){if(__owl__.willUnmountCB){__owl__.willUnmountCB();} this.willUnmount();__owl__.status=4;} const children=__owl__.children;for(let key in children){children[key].__destroy(this);} if(parent){let id=__owl__.id;delete parent.__owl__.children[id];__owl__.parent=null;} __owl__.status=5;delete __owl__.vnode;if(__owl__.currentFiber){__owl__.currentFiber.isCompleted=true;}} __callMounted(){const __owl__=this.__owl__;__owl__.status=3;__owl__.currentFiber=null;this.mounted();if(__owl__.mountedCB){__owl__.mountedCB();}} __callWillUnmount(){const __owl__=this.__owl__;if(__owl__.willUnmountCB){__owl__.willUnmountCB();} this.willUnmount();__owl__.status=4;if(__owl__.currentFiber){__owl__.currentFiber.isCompleted=true;__owl__.currentFiber.root.counter=0;} const children=__owl__.children;for(let id in children){const comp=children[id];if(comp.__owl__.status===3){comp.__callWillUnmount();}}} __trigger(component,eventType,payload){if(this.el){const ev=new OwlEvent(component,eventType,{bubbles:true,cancelable:true,detail:payload,});const triggerHook=this.env[portalSymbol];if(triggerHook){triggerHook(ev);} this.el.dispatchEvent(ev);}} async __updateProps(nextProps,parentFiber,scope){this.__owl__.scope=scope;const shouldUpdate=parentFiber.force||this.shouldUpdate(nextProps);if(shouldUpdate){const __owl__=this.__owl__;const fiber=new Fiber(parentFiber,this,parentFiber.force,null,null);if(!parentFiber.child){parentFiber.child=fiber;} else{parentFiber.lastChild.sibling=fiber;} parentFiber.lastChild=fiber;const defaultProps=this.constructor.defaultProps;if(defaultProps){this.__applyDefaultProps(nextProps,defaultProps);} if(QWeb.dev){QWeb.utils.validateProps(this.constructor,nextProps);} await Promise.all([this.willUpdateProps(nextProps),__owl__.willUpdatePropsCB&&__owl__.willUpdatePropsCB(nextProps),]);if(fiber.isCompleted){return;} this.props=nextProps;this.__render(fiber);}} __patch(target,vnode){this.__owl__.vnode=patch(target,vnode);} __prepare(parentFiber,scope,cb){this.__owl__.scope=scope;const fiber=new Fiber(parentFiber,this,parentFiber.force,null,null);fiber.shouldPatch=false;if(!parentFiber.child){parentFiber.child=fiber;} else{parentFiber.lastChild.sibling=fiber;} parentFiber.lastChild=fiber;this.__prepareAndRender(fiber,cb);return fiber;} __applyStyles(constr){while(constr&&constr.style){if(constr.hasOwnProperty("style")){activateSheet(constr.style,constr.name);delete constr.style;} constr=constr.__proto__;}} __getTemplate(qweb){let p=this.constructor;if(!p.hasOwnProperty("_template")){let template=p.name;while(!(template in qweb.templates)&&p!==Component){p=p.__proto__;template=p.name;} if(p===Component){throw new Error(`Could not find template for component "${this.constructor.name}"`);} else{p._template=template;}} return p._template;} async __prepareAndRender(fiber,cb){try{const proms=Promise.all([this.willStart(),this.__owl__.willStartCB&&this.__owl__.willStartCB(),]);this.__owl__.status=1;await proms;if(this.__owl__.status===5){return Promise.resolve();}} catch(e){fiber.handleError(e);return Promise.resolve();} if(!fiber.isCompleted){this.__render(fiber);this.__owl__.status=2;cb();}} __render(fiber){const __owl__=this.__owl__;if(__owl__.observer){__owl__.observer.allowMutations=false;} let error;try{let vnode=__owl__.renderFn(this,{handlers:__owl__.boundHandlers,fiber:fiber,});for(let childKey in __owl__.children){const child=__owl__.children[childKey];const childOwl=child.__owl__;if(childOwl.status!==3&&childOwl.parentLastFiberId{let curVal=fn(cur);if(lastGroup){if(curVal===lastValue){lastGroup.push(cur);} else{lastGroup=false;}} if(!lastGroup){lastGroup=[cur];acc.push(lastGroup);} lastValue=curVal;return acc;},[]);} class Context extends EventBus{constructor(state={}){super();this.rev=1;this.mapping={};this.observer=new Observer();this.observer.notifyCB=()=>{let rev=this.rev;return Promise.resolve().then(()=>{if(rev===this.rev){this.__notifyComponents();}});};this.state=this.observer.observe(state);this.subscriptions.update=[];} async __notifyComponents(){const rev=++this.rev;const subscriptions=this.subscriptions.update;const groups=partitionBy(subscriptions,(s)=>(s.owner?s.owner.__owl__.depth:-1));for(let group of groups){const proms=group.map((sub)=>sub.callback.call(sub.owner,rev));scheduler.flush();await Promise.all(proms);}}} function useContext(ctx){const component=Component.current;return useContextWithCB(ctx,component,component.render.bind(component));} function useContextWithCB(ctx,component,method){const __owl__=component.__owl__;const id=__owl__.id;const mapping=ctx.mapping;if(id in mapping){return ctx.state;} if(!__owl__.observer){__owl__.observer=new Observer();__owl__.observer.notifyCB=component.render.bind(component);} mapping[id]=0;const renderFn=__owl__.renderFn;__owl__.renderFn=function(comp,params){mapping[id]=ctx.rev;return renderFn(comp,params);};ctx.on("update",component,async(contextRev)=>{if(mapping[id]{ctx.off("update",component);delete mapping[id];__destroy.call(component,parent);};return ctx.state;} function useState(state){const component=Component.current;const __owl__=component.__owl__;if(!__owl__.observer){__owl__.observer=new Observer();__owl__.observer.notifyCB=component.render.bind(component);} return __owl__.observer.observe(state);} function makeLifecycleHook(method,reverse=false){if(reverse){return function(cb){const component=Component.current;if(component.__owl__[method]){const current=component.__owl__[method];component.__owl__[method]=function(){current.call(component);cb.call(component);};} else{component.__owl__[method]=cb;}};} else{return function(cb){const component=Component.current;if(component.__owl__[method]){const current=component.__owl__[method];component.__owl__[method]=function(){cb.call(component);current.call(component);};} else{component.__owl__[method]=cb;}};}} function makeAsyncHook(method){return function(cb){const component=Component.current;if(component.__owl__[method]){const current=component.__owl__[method];component.__owl__[method]=function(...args){return Promise.all([current.call(component,...args),cb.call(component,...args)]);};} else{component.__owl__[method]=cb;}};} const onMounted=makeLifecycleHook("mountedCB",true);const onWillUnmount=makeLifecycleHook("willUnmountCB");const onWillPatch=makeLifecycleHook("willPatchCB");const onPatched=makeLifecycleHook("patchedCB",true);const onWillStart=makeAsyncHook("willStartCB");const onWillUpdateProps=makeAsyncHook("willUpdatePropsCB");function useRef(name){const __owl__=Component.current.__owl__;return{get el(){const val=__owl__.refs&&__owl__.refs[name];if(val instanceof HTMLElement){return val;} else if(val instanceof Component){return val.el;} return null;},get comp(){const val=__owl__.refs&&__owl__.refs[name];return val instanceof Component?val:null;},};} function useComponent(){return Component.current;} function useEnv(){return Component.current.env;} function useSubEnv(nextEnv){const component=Component.current;component.env=Object.assign(Object.create(component.env),nextEnv);} function useExternalListener(target,eventName,handler,eventParams){const boundHandler=handler.bind(Component.current);onMounted(()=>target.addEventListener(eventName,boundHandler,eventParams));onWillUnmount(()=>target.removeEventListener(eventName,boundHandler,eventParams));} var _hooks=Object.freeze({__proto__:null,useState:useState,onMounted:onMounted,onWillUnmount:onWillUnmount,onWillPatch:onWillPatch,onPatched:onPatched,onWillStart:onWillStart,onWillUpdateProps:onWillUpdateProps,useRef:useRef,useComponent:useComponent,useEnv:useEnv,useSubEnv:useSubEnv,useExternalListener:useExternalListener});class Store extends Context{constructor(config){super(config.state);this.actions=config.actions;this.env=config.env;this.getters={};this.updateFunctions=[];if(config.getters){const firstArg={state:this.state,getters:this.getters,};for(let g in config.getters){this.getters[g]=config.getters[g].bind(this,firstArg);}}} dispatch(action,...payload){if(!this.actions[action]){throw new Error(`[Error] action ${action} is undefined`);} const result=this.actions[action]({dispatch:this.dispatch.bind(this),env:this.env,state:this.state,getters:this.getters,},...payload);return result;} __notifyComponents(){this.trigger("before-update");return super.__notifyComponents();}} const isStrictEqual=(a,b)=>a===b;function useStore(selector,options={}){const component=Component.current;const componentId=component.__owl__.id;const store=options.store||component.env.store;if(!(store instanceof Store)){throw new Error(`No store found when connecting '${component.constructor.name}'`);} let result=selector(store.state,component.props);const hashFn=store.observer.revNumber.bind(store.observer);let revNumber=hashFn(result);const isEqual=options.isEqual||isStrictEqual;if(!store.updateFunctions[componentId]){store.updateFunctions[componentId]=[];} function selectCompareUpdate(state,props){const oldResult=result;result=selector(state,props);const newRevNumber=hashFn(result);if((newRevNumber>0&&revNumber!==newRevNumber)||!isEqual(oldResult,result)){revNumber=newRevNumber;return true;} return false;} if(options.onUpdate){store.on("before-update",component,()=>{const newValue=selector(store.state,component.props);options.onUpdate(newValue);});} store.updateFunctions[componentId].push(function(){return selectCompareUpdate(store.state,component.props);});useContextWithCB(store,component,function(){let shouldRender=false;for(let fn of store.updateFunctions[componentId]){shouldRender=fn()||shouldRender;} if(shouldRender){return component.render();}});onWillUpdateProps((props)=>{selectCompareUpdate(store.state,props);});const __destroy=component.__destroy;component.__destroy=(parent)=>{delete store.updateFunctions[componentId];if(options.onUpdate){store.off("before-update",component);} __destroy.call(component,parent);};if(typeof result!=="object"||result===null){return result;} return new Proxy(result,{get(target,k){return result[k];},set(target,k,v){throw new Error("Store state should only be modified through actions");},has(target,k){return k in result;},});} function useDispatch(store){store=store||Component.current.env.store;return store.dispatch.bind(store);} function useGetters(store){store=store||Component.current.env.store;return store.getters;} function xml(strings,...args){const name=`__template__${QWeb.nextId++}`;const value=String.raw(strings,...args);QWeb.registerTemplate(name,value);return name;} function css(strings,...args){const name=`__sheet__${QWeb.nextId++}`;const value=String.raw(strings,...args);registerSheet(name,value);return name;} var _tags=Object.freeze({__proto__:null,xml:xml,css:css});class AsyncRoot extends Component{async __updateProps(nextProps,parentFiber){this.render(parentFiber.force);}} AsyncRoot.template=xml``;class Portal extends Component{constructor(parent,props){super(parent,props);this.doTargetLookUp=true;this._handledEvents=new Set();this._handlerTunnel=(ev)=>{ev.stopPropagation();this.__trigger(ev.originalComponent,ev.type,ev.detail);};this.parentEnv=null;this.portal=null;this.target=null;this.parentEnv=parent?parent.env:{};useSubEnv({[portalSymbol]:(ev)=>{if(!this._handledEvents.has(ev.type)){this.portal.elm.addEventListener(ev.type,this._handlerTunnel);this._handledEvents.add(ev.type);}},});} __callWillUnmount(){super.__callWillUnmount();this.el.appendChild(this.portal.elm);this.doTargetLookUp=true;} __checkVNodeStructure(vnode){const children=vnode.children;let countRealNodes=0;for(let child of children){if(child.sel){countRealNodes++;}} if(countRealNodes!==1){throw new Error(`Portal must have exactly one non-text child (has ${countRealNodes})`);}} __checkTargetPresence(){if(!this.target||!document.contains(this.target)){throw new Error(`Could not find any match for "${this.props.target}"`);}} __deployPortal(){this.__checkTargetPresence();this.target.appendChild(this.portal.elm);} __destroy(parent){if(this.portal&&this.portal.elm){const displacedElm=this.portal.elm;const parent=displacedElm.parentNode;if(parent){parent.removeChild(displacedElm);}} super.__destroy(parent);} __patch(target,vnode){if(this.doTargetLookUp){const target=document.querySelector(this.props.target);if(!target){this.env.qweb.on("dom-appended",this,()=>{this.doTargetLookUp=false;this.env.qweb.off("dom-appended",this);this.target=document.querySelector(this.props.target);this.__deployPortal();});} else{this.doTargetLookUp=false;this.target=target;}} this.__checkVNodeStructure(vnode);const shouldDeploy=(!this.portal||this.el.contains(this.portal.elm))&&!this.doTargetLookUp;if(!this.doTargetLookUp&&!shouldDeploy){this.__checkTargetPresence();} const portalPatch=this.portal?this.portal:document.createElement(vnode.children[0].sel);this.portal=patch(portalPatch,vnode.children[0]);vnode.children=[];super.__patch(target,vnode);if(shouldDeploy){this.__deployPortal();}} __trigger(component,eventType,payload){const env=this.env;this.env=this.parentEnv;super.__trigger(component,eventType,payload);this.env=env;}} Portal.template=xml``;Portal.props={target:{type:String,},};class Link extends Component{constructor(){super(...arguments);this.href=this.env.router.destToPath(this.props);} async willUpdateProps(nextProps){this.href=this.env.router.destToPath(nextProps);} get isActive(){if(this.env.router.mode==="hash"){return document.location.hash===this.href;} return document.location.pathname===this.href;} navigate(ev){if(ev.metaKey||ev.altKey||ev.ctrlKey||ev.shiftKey){return;} if(ev.button!==undefined&&ev.button!==0){return;} if(ev.currentTarget&&ev.currentTarget.getAttribute){const target=ev.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(target)){return;}} ev.preventDefault();this.env.router.navigate(this.props);}} Link.template=xml` `;class RouteComponent extends Component{get routeComponent(){return this.env.router.currentRoute&&this.env.router.currentRoute.component;}} RouteComponent.template=xml` `;const paramRegexp=/\{\{(.*?)\}\}/;const globalParamRegexp=new RegExp(paramRegexp.source,"g");class Router{constructor(env,routes,options={mode:"history"}){this.currentRoute=null;this.currentParams=null;env.router=this;this.mode=options.mode;this.env=env;this.routes={};this.routeIds=[];let nextId=1;for(let partialRoute of routes){if(!partialRoute.name){partialRoute.name="__route__"+nextId++;} if(partialRoute.component){QWeb.registerComponent("__component__"+partialRoute.name,partialRoute.component);} if(partialRoute.redirect){this.validateDestination(partialRoute.redirect);} partialRoute.params=partialRoute.path?findParams(partialRoute.path):[];partialRoute.extractionRegExp=makeExtractionRegExp(partialRoute.path);this.routes[partialRoute.name]=partialRoute;this.routeIds.push(partialRoute.name);}} async start(){this._listener=(ev)=>this._navigate(this.currentPath(),ev);window.addEventListener("popstate",this._listener);if(this.mode==="hash"){window.addEventListener("hashchange",this._listener);} const result=await this.matchAndApplyRules(this.currentPath());if(result.type==="match"){this.currentRoute=result.route;this.currentParams=result.params;const currentPath=this.routeToPath(result.route,result.params);if(currentPath!==this.currentPath()){this.setUrlFromPath(currentPath);}}} async navigate(to){const path=this.destToPath(to);return this._navigate(path);} async _navigate(path,ev){const initialName=this.currentRouteName;const initialParams=this.currentParams;const result=await this.matchAndApplyRules(path);if(result.type==="match"){let finalPath=this.routeToPath(result.route,result.params);if(path.indexOf("?")>-1){finalPath+="?"+path.split("?")[1];} const isPopStateEvent=ev&&ev instanceof PopStateEvent;if(!isPopStateEvent){this.setUrlFromPath(finalPath);} this.currentRoute=result.route;this.currentParams=result.params;} else if(result.type==="nomatch"){this.currentRoute=null;this.currentParams=null;} const didChange=this.currentRouteName!==initialName||!shallowEqual(this.currentParams,initialParams);if(didChange){this.env.qweb.forceUpdate();return true;} return false;} destToPath(dest){this.validateDestination(dest);return dest.path||this.routeToPath(this.routes[dest.to],dest.params);} get currentRouteName(){return this.currentRoute&&this.currentRoute.name;} setUrlFromPath(path){const separator=this.mode==="hash"?location.pathname:"";const url=location.origin+separator+path;if(url!==window.location.href){window.history.pushState({},path,url);}} validateDestination(dest){if((!dest.path&&!dest.to)||(dest.path&&dest.to)){throw new Error(`Invalid destination: ${JSON.stringify(dest)}`);}} routeToPath(route,params){const prefix=this.mode==="hash"?"#":"";return(prefix+ route.path.replace(globalParamRegexp,(match,param)=>{const[key]=param.split(".");return params[key];}));} currentPath(){let result=this.mode==="history"?window.location.pathname:window.location.hash.slice(1);return result||"/";} match(path){for(let routeId of this.routeIds){let route=this.routes[routeId];let params=this.getRouteParams(route,path);if(params){return{type:"match",route:route,params:params,};}} return{type:"nomatch"};} async matchAndApplyRules(path){const result=this.match(path);if(result.type==="match"){return this.applyRules(result);} return result;} async applyRules(matchResult){const route=matchResult.route;if(route.redirect){const path=this.destToPath(route.redirect);return this.matchAndApplyRules(path);} if(route.beforeRouteEnter){const result=await route.beforeRouteEnter({env:this.env,from:this.currentRoute,to:route,});if(result===false){return{type:"cancelled"};} else if(result!==true){const path=this.destToPath(result);return this.matchAndApplyRules(path);}} return matchResult;} getRouteParams(route,path){if(route.path==="*"){return{};} if(path.indexOf("?")>-1){path=path.split("?")[0];} if(path.startsWith("#")){path=path.slice(1);} const paramsMatch=path.match(route.extractionRegExp);if(!paramsMatch){return false;} const result={};route.params.forEach((param,index)=>{const[key,suffix]=param.split(".");const paramValue=paramsMatch[index+1];if(suffix==="number"){return(result[key]=parseInt(paramValue,10));} return(result[key]=paramValue);});return result;}} function findParams(str){const result=[];let m;do{m=globalParamRegexp.exec(str);if(m){result.push(m[1]);}}while(m);return result;} function escapeRegExp(str){return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");} function makeExtractionRegExp(path){const extractionString=path.split(paramRegexp).map((part,index)=>{return index%2?"(.*)":escapeRegExp(part);}).join("");return new RegExp(`^${extractionString}$`);} const Context$1=Context;const useState$1=useState;const core={EventBus,Observer};const router={Router,RouteComponent,Link};const Store$1=Store;const utils=_utils;const tags=_tags;const misc={AsyncRoot,Portal};const hooks$1=Object.assign({},_hooks,{useContext:useContext,useDispatch:useDispatch,useGetters:useGetters,useStore:useStore,});const __info__={};exports.Component=Component;exports.Context=Context$1;exports.QWeb=QWeb;exports.Store=Store$1;exports.__info__=__info__;exports.browser=browser;exports.config=config;exports.core=core;exports.hooks=hooks$1;exports.misc=misc;exports.mount=mount;exports.router=router;exports.tags=tags;exports.useState=useState$1;exports.utils=utils;__info__.version='1.4.3';__info__.date='2021-07-08T09:54:52.593Z';__info__.hash='9fe2da7';__info__.url='https://github.com/odoo/owl';}(this.owl=this.owl||{}));; /* /web/static/src/js/component_extension.js defined in bundle 'web.assets_common_lazy' */ (function(){odoo.widgetSymbol=Symbol('widget');owl.Component.prototype.rpc=function(){return new Promise((resolve,reject)=>{return this.env.services.rpc(...arguments).then(result=>{if(this.__owl__.status!==5){resolve(result);}}).catch(reason=>{if(this.__owl__.status!==5){reject(reason);}});});};const originalTrigger=owl.Component.prototype.__trigger;owl.Component.prototype.__trigger=function(component,evType,payload){if(this.env[odoo.widgetSymbol]){this.env[odoo.widgetSymbol](evType);} originalTrigger.call(this,component,evType,payload);};})();; /* /web/static/lib/jquery/jquery.js defined in bundle 'web.assets_common_lazy' */ (function(global,factory){"use strict";if(typeof module==="object"&&typeof module.exports==="object"){module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");} return factory(w);};}else{factory(global);}})(typeof window!=="undefined"?window:this,function(window,noGlobal){"use strict";var arr=[];var document=window.document;var getProto=Object.getPrototypeOf;var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};var isFunction=function isFunction(obj){return typeof obj==="function"&&typeof obj.nodeType!=="number";};var isWindow=function isWindow(obj){return obj!=null&&obj===obj.window;};var preservedScriptAttributes={type:true,src:true,noModule:true};function DOMEval(code,doc,node){doc=doc||document;var i,script=doc.createElement("script");script.text=code;if(node){for(i in preservedScriptAttributes){if(node[i]){script[i]=node[i];}}} doc.head.appendChild(script).parentNode.removeChild(script);} function toType(obj){if(obj==null){return obj+"";} return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj;} var version="3.3.1",jQuery=function(selector,context){return new jQuery.fn.init(selector,context);},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function(){return slice.call(this);},get:function(num){if(num==null){return slice.call(this);} return num<0?this[num+this.length]:this[num];},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;return ret;},each:function(callback){return jQuery.each(this,callback);},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},slice:function(){return this.pushStack(slice.apply(this,arguments));},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j0&&(length-1)in obj;} var Sizzle=(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date(),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true;} return 0;},hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={"ID":new RegExp("^#("+identifier+")"),"CLASS":new RegExp("^\\.("+identifier+")"),"TAG":new RegExp("^("+identifier+"|[*])"),"ATTR":new RegExp("^"+attributes),"PSEUDO":new RegExp("^"+pseudos),"CHILD":new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),"bool":new RegExp("^(?:"+booleans+")$","i"),"needsContext":new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-0x10000;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+0x10000):String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);},rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"\uFFFD";} return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";} return"\\"+ch;},unloadHandler=function(){setDocument();},disabledAncestor=addCombinator(function(elem){return elem.disabled===true&&("form"in elem||"label"in elem);},{dir:"parentNode",next:"legend"});try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els));}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){} target.length=j-1;}};} function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results;} if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context);} context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){if((elem=context.getElementById(m))){if(elem.id===m){results.push(elem);return results;}}else{return results;}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results;}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results;}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}} if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector;}else if(context.nodeName.toLowerCase()!=="object"){if((nid=context.getAttribute("id"))){nid=nid.replace(rcssescape,fcssescape);}else{context.setAttribute("id",(nid=expando));} groups=tokenize(selector);i=groups.length;while(i--){groups[i]="#"+nid+" "+toSelector(groups[i]);} newSelector=groups.join(",");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;} if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id");}}}}}} return select(selector.replace(rtrim,"$1"),context,results,seed);} function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()];} return(cache[key+" "]=value);} return cache;} function markFunction(fn){fn[expando]=true;return fn;} function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el);}catch(e){return false;}finally{if(el.parentNode){el.parentNode.removeChild(el);} el=null;}} function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler;}} function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&a.sourceIndex-b.sourceIndex;if(diff){return diff;} if(cur){while((cur=cur.nextSibling)){if(cur===b){return-1;}}} return a?1:-1;} function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type;};} function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type;};} function createDisabledPseudo(disabled){return function(elem){if("form"in elem){if(elem.parentNode&&elem.disabled===false){if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled;}else{return elem.disabled===disabled;}} return elem.isDisabled===disabled||elem.isDisabled!==!disabled&&disabledAncestor(elem)===disabled;} return elem.disabled===disabled;}else if("label"in elem){return elem.disabled===disabled;} return false;};} function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j]);}}});});} function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context;} support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false;};setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document;} document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if(preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){if(subWindow.addEventListener){subWindow.addEventListener("unload",unloadHandler,false);}else if(subWindow.attachEvent){subWindow.attachEvent("onunload",unloadHandler);}} support.attributes=assert(function(el){el.className="i";return!el.getAttribute("className");});support.getElementsByTagName=assert(function(el){el.appendChild(document.createComment(""));return!el.getElementsByTagName("*").length;});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(el){docElem.appendChild(el).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length;});if(support.getById){Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[];}};}else{Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId;};};Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];} elems=context.getElementsByName(id);i=0;while((elem=elems[i++])){node=elem.getAttributeNode("id");if(node&&node.value===id){return[elem];}}} return[];}};} Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag);}else if(support.qsa){return context.querySelectorAll(tag);}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem);}} return tmp;} return results;};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className);}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(document.querySelectorAll))){assert(function(el){docElem.appendChild(el).innerHTML=""+"";if(el.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")");} if(!el.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");} if(!el.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=");} if(!el.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");} if(!el.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]");}});assert(function(el){el.innerHTML=""+"";var input=document.createElement("input");input.setAttribute("type","hidden");el.appendChild(input).setAttribute("name","D");if(el.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=");} if(el.querySelectorAll(":enabled").length!==2){rbuggyQSA.push(":enabled",":disabled");} docElem.appendChild(el).disabled=true;if(el.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled");} el.querySelectorAll("*,:x");rbuggyQSA.push(",.*:");});} if((support.matchesSelector=rnative.test((matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(el){support.disconnectedMatch=matches.call(el,"*");matches.call(el,"[s!='']:x");rbuggyMatches.push("!=",pseudos);});} rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16));}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true;}}} return false;};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0;} var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare;} compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1;} if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1;} return sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;} return compare&4?-1:1;}:function(a,b){if(a===b){hasDuplicate=true;return 0;} var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?(indexOf(sortInput,a)-indexOf(sortInput,b)):0;}else if(aup===bup){return siblingCheck(a,b);} cur=a;while((cur=cur.parentNode)){ap.unshift(cur);} cur=b;while((cur=cur.parentNode)){bp.unshift(cur);} while(ap[i]===bp[i]){i++;} return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0;};return document;};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements);};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem);} expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret;}}catch(e){}} return Sizzle(expr,document,null,[elem]).length>0;};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context);} return contains(context,elem);};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem);} var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null;};Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape);};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i);}} while(j--){results.splice(duplicates[j],1);}} sortInput=null;return results;};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node);}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent;}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem);}}}else if(nodeType===3||nodeType===4){return elem.nodeValue;} return ret;};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{"ATTR":function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" ";} return match.slice(0,4);},"CHILD":function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0]);} match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd");}else if(match[3]){Sizzle.error(match[0]);} return match;},"PSEUDO":function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null;} if(match[3]){match[2]=match[4]||match[5]||"";}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess);} return match.slice(0,3);}},filter:{"TAG":function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName;};},"CLASS":function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"");});},"ATTR":function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!=";} if(!operator){return true;} result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false;};},"CHILD":function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode;}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false;}} start=dir=type==="only"&&!start&&"nextSibling";} return true;} start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break;}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex;} if(diff===false){while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff];} if(node===elem){break;}}}}} diff-=last;return diff===first||(diff%first===0&&diff/first>=0);}};},"PSEUDO":function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument);} if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i]);}}):function(elem){return fn(elem,0,args);};} return fn;}},pseudos:{"not":markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem);}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop();};}),"has":markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0;};}),"contains":markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1;};}),"lang":markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang);} lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0;}}while((elem=elem.parentNode)&&elem.nodeType===1);return false;};}),"target":function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id;},"root":function(elem){return elem===docElem;},"focus":function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex);},"enabled":createDisabledPseudo(false),"disabled":createDisabledPseudo(true),"checked":function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected);},"selected":function(elem){if(elem.parentNode){elem.parentNode.selectedIndex;} return elem.selected===true;},"empty":function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false;}} return true;},"parent":function(elem){return!Expr.pseudos["empty"](elem);},"header":function(elem){return rheader.test(elem.nodeName);},"input":function(elem){return rinputs.test(elem.nodeName);},"button":function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button";},"text":function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text");},"first":createPositionalPseudo(function(){return[0];}),"last":createPositionalPseudo(function(matchIndexes,length){return[length-1];}),"eq":createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument];}),"even":createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i=0;){matchIndexes.push(i);} return matchIndexes;}),"gt":createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false;}} return true;}:matchers[0];} function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i-1){seed[temp]=!(results[temp]=elem);}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml);}else{push.apply(results,matcherOut);}}});} function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext;},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1;},implicitRelative,true),matchers=[function(elem,context,xml){var ret=(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret;}];for(;i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context===document||context||outermost;} for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML;} while((matcher=elementMatchers[j++])){if(matcher(elem,context||document,xml)){results.push(elem);break;}} if(outermost){dirruns=dirrunsUnique;}} if(bySet){if((elem=!matcher&&elem)){matchedCount--;} if(seed){unmatched.push(elem);}}} matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml);} if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}} setMatched=condense(setMatched);} push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results);}} if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup;} return unmatched;};return bySet?markFunction(superMatcher):superMatcher;} compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector);} i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached);}else{elementMatchers.push(cached);}} cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector;} return cached;};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize((selector=compiled.selector||selector));results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results;}else if(compiled){context=context.parentNode;} selector=selector.slice(tokens.shift().value.length);} i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break;} if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;} break;}}}} (compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results;};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(el){return el.compareDocumentPosition(document.createElement("fieldset"))&1;});if(!assert(function(el){el.innerHTML="";return el.firstChild.getAttribute("href")==="#";})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2);}});} if(!support.attributes||!assert(function(el){el.innerHTML="";el.firstChild.setAttribute("value","");return el.firstChild.getAttribute("value")==="";})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue;}});} if(!assert(function(el){return el.getAttribute("disabled")==null;})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null;}});} return Sizzle;})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;jQuery.escapeSelector=Sizzle.escape;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break;} matched.push(elem);}} return matched;};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n);}} return matched;};var rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();};var rsingleTag=(/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i);function winnow(elements,qualifier,not){if(isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not;});} if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not;});} if(typeof qualifier!=="string"){return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>-1)!==not;});} return jQuery.filter(qualifier,elements,not);} jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";} if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[];} return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));};jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.uniqueSort(ret):ret;},filter:function(selector){return this.pushStack(winnow(this,selector||[],false));},not:function(selector){return this.pushStack(winnow(this,selector||[],true));},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length;}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this;} root=root||rootjQuery;if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null];}else{match=rquickExpr.exec(selector);} if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(isFunction(this[match])){this[match](context[match]);}else{this.attr(match,context[match]);}}} return this;}else{elem=document.getElementById(match[2]);if(elem){this[0]=elem;this.length=1;} return this;}}else if(!context||context.jquery){return(context||root).find(selector);}else{return this.constructor(context).find(selector);}}else if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery);} return jQuery.makeArray(selector,this);};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break;}}}} return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1;} if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0]);} return indexOf.call(this,elem.jquery?elem[0]:elem);},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))));},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){} return cur;} jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function(elem){return dir(elem,"parentNode");},parentsUntil:function(elem,i,until){return dir(elem,"parentNode",until);},next:function(elem){return sibling(elem,"nextSibling");},prev:function(elem){return sibling(elem,"previousSibling");},nextAll:function(elem){return dir(elem,"nextSibling");},prevAll:function(elem){return dir(elem,"previousSibling");},nextUntil:function(elem,i,until){return dir(elem,"nextSibling",until);},prevUntil:function(elem,i,until){return dir(elem,"previousSibling",until);},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem);},children:function(elem){return siblings(elem.firstChild);},contents:function(elem){if(nodeName(elem,"iframe")){return elem.contentDocument;} if(nodeName(elem,"template")){elem=elem.content||elem;} return jQuery.merge([],elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until;} if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched);} if(this.length>1){if(!guaranteedUnique[name]){jQuery.uniqueSort(matched);} if(rparentsprev.test(name)){matched.reverse();}} return this.pushStack(matched);};});var rnothtmlwhite=(/[^\x20\t\r\n\f]+/g);function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true;});return object;} jQuery.Callbacks=function(options){options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){locked=locked||options.once;fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex-1){list.splice(index,1);if(index<=firingIndex){firingIndex--;}}});return this;},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0;},empty:function(){if(list){list=[];} return this;},disable:function(){locked=queue=[];list=memory="";return this;},disabled:function(){return!list;},lock:function(){locked=queue=[];if(!memory&&!firing){list=memory="";} return this;},locked:function(){return!!locked;},fireWith:function(context,args){if(!locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire();}} return this;},fire:function(){self.fireWith(this,arguments);return this;},fired:function(){return!!fired;}};return self;};function Identity(v){return v;} function Thrower(ex){throw ex;} function adoptValue(value,resolve,reject,noValue){var method;try{if(value&&isFunction((method=value.promise))){method.call(value).done(resolve).fail(reject);}else if(value&&isFunction((method=value.then))){method.call(value,resolve,reject);}else{resolve.apply(undefined,[value].slice(noValue));}}catch(value){reject.apply(undefined,[value]);}} jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state;},always:function(){deferred.done(arguments).fail(arguments);return this;},"catch":function(fn){return promise.then(null,fn);},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);}else{newDefer[tuple[0]+"With"](this,fn?[returned]:arguments);}});});fns=null;}).promise();},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(depth=maxDepth){if(handler!==Thrower){that=undefined;args=[e];} deferred.rejectWith(that,args);}}};if(depth){process();}else{if(jQuery.Deferred.getStackHook){process.stackTrace=jQuery.Deferred.getStackHook();} window.setTimeout(process);}};} return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity));tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower));}).promise();},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise;}},deferred={};jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString;},tuples[3-i][2].disable,tuples[3-i][3].disable,tuples[0][2].lock,tuples[0][3].lock);} list.add(tuple[3].fire);deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);return this;};deferred[tuple[0]+"With"]=list.fireWith;});promise.promise(deferred);if(func){func.call(deferred,deferred);} return deferred;},when:function(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),master=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?slice.call(arguments):value;if(!(--remaining)){master.resolveWith(resolveContexts,resolveValues);}};};if(remaining<=1){adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining);if(master.state()==="pending"||isFunction(resolveValues[i]&&resolveValues[i].then)){return master.then();}} while(i--){adoptValue(resolveValues[i],updateFunc(i),master.reject);} return master.promise();}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack);}};jQuery.readyException=function(error){window.setTimeout(function(){throw error;});};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn).catch(function(error){jQuery.readyException(error);});return this;};jQuery.extend({isReady:false,readyWait:1,ready:function(wait){if(wait===true?--jQuery.readyWait:jQuery.isReady){return;} jQuery.isReady=true;if(wait!==true&&--jQuery.readyWait>0){return;} readyList.resolveWith(document,[jQuery]);}});jQuery.ready.then=readyList.then;function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready();} if(document.readyState==="complete"||(document.readyState!=="loading"&&!document.documentElement.doScroll)){window.setTimeout(jQuery.ready);}else{document.addEventListener("DOMContentLoaded",completed);window.addEventListener("load",completed);} var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(toType(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw);}}else if(value!==undefined){chainable=true;if(!isFunction(value)){raw=true;} if(bulk){if(raw){fn.call(elems,value);fn=null;}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value);};}} if(fn){for(;i1,null,true);},removeData:function(key){return this.each(function(){dataUser.remove(this,key);});}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data));}else{queue.push(data);}} return queue||[];}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type);};if(fn==="inprogress"){fn=queue.shift();startLength--;} if(fn){if(type==="fx"){queue.unshift("inprogress");} delete hooks.stop;fn.call(elem,next,hooks);} if(!startLength&&hooks){hooks.empty.fire();}},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key]);})});}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;} if(arguments.length\x20\t\r\n\f]+)/i);var rscriptType=(/^$|^module$|\/(?:java|ecma)script/i);var wrapMap={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function getAll(context,tag){var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*");}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*");}else{ret=[];} if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret);} return ret;} function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i-1){if(ignored){ignored.push(elem);} continue;} contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp);} if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem);}}}} return fragment;} (function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;div.innerHTML="";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;})();var documentElement=document.documentElement;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true;} function returnFalse(){return false;} function safeActiveElement(){try{return document.activeElement;}catch(err){}} function on(elem,types,selector,data,fn,one){var origFn,type;if(typeof types==="object"){if(typeof selector!=="string"){data=data||selector;selector=undefined;} for(type in types){on(elem,type,selector,data,types[type],one);} return elem;} if(data==null&&fn==null){fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){fn=data;data=undefined;}else{fn=data;data=selector;selector=undefined;}} if(fn===false){fn=returnFalse;}else if(!fn){return elem;} if(one===1){origFn=fn;fn=function(event){jQuery().off(event);return origFn.apply(this,arguments);};fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);} return elem.each(function(){jQuery.event.add(this,types,fn,data,selector);});} jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(!elemData){return;} if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;} if(selector){jQuery.find.matchesSelector(documentElement,selector);} if(!handler.guid){handler.guid=jQuery.guid++;} if(!(events=elemData.events)){events=elemData.events={};} if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined;};} types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue;} special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle);}}} if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}} if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else{handlers.push(handleObj);} jQuery.event.global[type]=true;}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return;} types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);} continue;} special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;} if(special.remove){special.remove.call(elem,handleObj);}}} if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle);} delete events[type];}} if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events");}},dispatch:function(nativeEvent){var event=jQuery.event.fix(nativeEvent);var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),handlers=(dataPriv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;for(i=1;i=1)){for(;cur!==this;cur=cur.parentNode||this){if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i-1:jQuery.find(sel,this,null,[cur]).length;} if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}} if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}}} cur=this;if(delegateCount\x20\t\r\n\f]*)[^>]*)\/>/gi,rnoInnerhtml=/\s*$/g;function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery(elem).children("tbody")[0]||elem;} return elem;} function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem;} function restoreScript(elem){if((elem.type||"").slice(0,5)==="true/"){elem.type=elem.type.slice(5);}else{elem.removeAttribute("type");} return elem;} function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(dest.nodeType!==1){return;} if(dataPriv.hasData(src)){pdataOld=dataPriv.access(src);pdataCur=dataPriv.set(dest,pdataOld);events=pdataOld.events;if(events){delete pdataCur.handle;pdataCur.events={};for(type in events){for(i=0,l=events[type].length;i1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return collection.each(function(index){var self=collection.eq(index);if(valueIsFunction){args[0]=value.call(this,index,self.html());} domManip(self,args,callback,ignored);});} if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first;} if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i");},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));} return clone;},cleanData:function(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if((data=elem[dataPriv.expando])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);}else{jQuery.removeEvent(elem,type,data.handle);}}} elem[dataPriv.expando]=undefined;} if(elem[dataUser.expando]){elem[dataUser.expando]=undefined;}}}}});jQuery.fn.extend({detach:function(selector){return remove(this,selector,true);},remove:function(selector){return remove(this,selector);},text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value;}});},null,value,arguments.length);},append:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent="";}} return this;},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML;} if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i=0){delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]- computedVal- delta- extra- 0.5));} return delta;} function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),val=curCSS(elem,dimension,styles),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",valueIsBorderBox=isBorderBox;if(rnumnonpx.test(val)){if(!extra){return val;} val="auto";} valueIsBorderBox=valueIsBorderBox&&(support.boxSizingReliable()||val===elem.style[dimension]);if(val==="auto"||!parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline"){val=elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)];valueIsBorderBox=true;} val=parseFloat(val)||0;return(val+ boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val))+"px";} jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}}}},cssNumber:{"animationIterationCount":true,"columnCount":true,"fillOpacity":true,"flexGrow":true,"flexShrink":true,"fontWeight":true,"lineHeight":true,"opacity":true,"order":true,"orphans":true,"widows":true,"zIndex":true,"zoom":true},cssProps:{},style:function(elem,name,value,extra){if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;} var ret,type,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;if(!isCustomProp){name=finalPropName(origName);} hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(value!==undefined){type=typeof value;if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);type="number";} if(value==null||value!==value){return;} if(type==="number"){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");} if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit";} if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value);}else{style[name]=value;}}}else{if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;} return style[name];}},css:function(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name);if(!isCustomProp){name=finalPropName(origName);} hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra);} if(val===undefined){val=curCSS(elem,name,styles);} if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name];} if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val;} return val;}});jQuery.each(["height","width"],function(i,dimension){jQuery.cssHooks[dimension]={get:function(elem,computed,extra){if(computed){return rdisplayswap.test(jQuery.css(elem,"display"))&&(!elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra);}):getWidthOrHeight(elem,dimension,extra);}},set:function(elem,value,extra){var matches,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box",subtract=extra&&boxModelAdjustment(elem,dimension,extra,isBorderBox,styles);if(isBorderBox&&support.scrollboxSize()===styles.position){subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]- parseFloat(styles[dimension])- boxModelAdjustment(elem,dimension,"border",false,styles)- 0.5);} if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[dimension]=value;value=jQuery.css(elem,dimension);} return setPositiveNumber(elem,value,subtract);}};});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left- swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left;}))+"px";}});jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){var i=0,expanded={},parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];} return expanded;}};if(prefix!=="margin"){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;}});jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i1);}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing);} jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px");},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this);},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);}else{this.pos=eased=percent;} this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);} if(hooks&&hooks.set){hooks.set(this);}else{Tween.propHooks._default.set(this);} return this;}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop];} result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result;},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween);}else if(tween.elem.nodeType===1&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);}else{tween.elem[tween.prop]=tween.now;}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now;}}};jQuery.easing={linear:function(p){return p;},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2;},_default:"swing"};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule);}else{window.setTimeout(schedule,jQuery.fx.interval);} jQuery.fx.tick();}} function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return(fxNow=Date.now());} function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type;} if(includeWidth){attrs.opacity=attrs.width=type;} return attrs;} function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index1);},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name);});}});jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;} if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value);} if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined);} if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return;} if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;} elem.setAttribute(name,value+"");return value;} if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;} ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret;},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;} return value;}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){elem.removeAttribute(name);}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name);}else{elem.setAttribute(name,name);} return name;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle;} return ret;};});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name];});}});jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(nType===3||nType===8||nType===2){return;} if(nType!==1||!jQuery.isXMLDoc(elem)){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];} if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;} return(elem[name]=value);} if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;} return elem[name];},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10);} if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0;} return-1;}}},propFix:{"for":"htmlFor","class":"className"}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex;} return null;},set:function(elem){var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}};} jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ");} function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||"";} function classesToArray(value){if(Array.isArray(value)){return value;} if(typeof value==="string"){return value.match(rnothtmlwhite)||[];} return[];} jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)));});} classes=classesToArray(value);if(classes.length){while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" ";}} finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}} return this;},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)));});} if(!arguments.length){return this.attr("class","");} classes=classesToArray(value);if(classes.length){while((elem=this[i++])){curValue=getClass(elem);cur=elem.nodeType===1&&(" "+stripAndCollapse(curValue)+" ");if(cur){j=0;while((clazz=classes[j++])){while(cur.indexOf(" "+clazz+" ")>-1){cur=cur.replace(" "+clazz+" "," ");}} finalValue=stripAndCollapse(cur);if(curValue!==finalValue){elem.setAttribute("class",finalValue);}}}} return this;},toggleClass:function(value,stateVal){var type=typeof value,isValidValue=type==="string"||Array.isArray(value);if(typeof stateVal==="boolean"&&isValidValue){return stateVal?this.addClass(value):this.removeClass(value);} if(isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal);});} return this.each(function(){var className,i,self,classNames;if(isValidValue){i=0;self=jQuery(this);classNames=classesToArray(value);while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className);}else{self.addClass(className);}}}else if(value===undefined||type==="boolean"){className=getClass(this);if(className){dataPriv.set(this,"__className__",className);} if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"");}}});},hasClass:function(selector){var className,elem,i=0;className=" "+selector+" ";while((elem=this[i++])){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true;}} return false;}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;} ret=elem.value;if(typeof ret==="string"){return ret.replace(rreturn,"");} return ret==null?"":ret;} return;} valueIsFunction=isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return;} if(valueIsFunction){val=value.call(this,i,jQuery(this).val());}else{val=value;} if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});} hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:stripAndCollapse(jQuery.text(elem));}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max;}else{i=one?index:0;} for(;i-1){optionSet=true;}} if(!optionSet){elem.selectedIndex=-1;} return values;}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1);}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});support.focusin="onfocusin"in window;var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation();};jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=lastElement=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return;} if(rfocusMorph.test(type+jQuery.event.triggered)){return;} if(type.indexOf(".")>-1){namespaces=type.split(".");type=namespaces.shift();namespaces.sort();} ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem;} data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return;} if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode;} for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur;} if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window);}} i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){lastElement=cur;event.type=i>1?bubbleType:special.bindType||type;handle=(dataPriv.get(cur,"events")||{})[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data);} handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault();}}} event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){if(ontype&&isFunction(elem[type])&&!isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null;} jQuery.event.triggered=type;if(event.isPropagationStopped()){lastElement.addEventListener(type,stopPropagationCallback);} elem[type]();if(event.isPropagationStopped()){lastElement.removeEventListener(type,stopPropagationCallback);} jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp;}}}} return event.result;},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem);}});jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});if(!support.focusin){jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event));};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);if(!attaches){doc.addEventListener(orig,handler,true);} dataPriv.access(doc,fix,(attaches||0)+1);},teardown:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;if(!attaches){doc.removeEventListener(orig,handler,true);dataPriv.remove(doc,fix);}else{dataPriv.access(doc,fix,attaches);}}};});} var location=window.location;var nonce=Date.now();var rquery=(/\?/);jQuery.parseXML=function(data){var xml;if(!data||typeof data!=="string"){return null;} try{xml=(new window.DOMParser()).parseFromString(data,"text/xml");}catch(e){xml=undefined;} if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data);} return xml;};var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v);}else{buildParams(prefix+"["+(typeof v==="object"&&v!=null?i:"")+"]",v,traditional,add);}});}else if(!traditional&&toType(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else{add(prefix,obj);}} jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+ encodeURIComponent(value==null?"":value);};if(Array.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value);});}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add);}} return s.join("&");};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this;}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type));}).map(function(i,elem){var val=jQuery(this).val();if(val==null){return null;} if(Array.isArray(val)){return jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")};});} return{name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href;function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";} var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func)){while((dataType=dataTypes[i++])){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func);}else{(structure[dataType]=structure[dataType]||[]).push(func);}}}};} function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false;}else if(seekingTransport){return!(selected=dataTypeOrTransport);}});return selected;} return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");} function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key];}} if(deep){jQuery.extend(true,target,deep);} return target;} function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");}} if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;} if(!firstDataType){firstDataType=type;}} finalDataType=finalDataType||firstDataType;} if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);} return responses[finalDataType];}} function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}} current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;} if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);} prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev;}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2];}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);} break;}}}} if(conv!==true){if(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}} return{state:"success",data:response};} jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target);},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined;} options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2];}} match=responseHeaders[key.toLowerCase()];} return match==null?null:match;},getAllResponseHeaders:function(){return completed?responseHeadersString:null;},setRequestHeader:function(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value;} return this;},overrideMimeType:function(type){if(completed==null){s.mimeType=type;} return this;},statusCode:function(map){var code;if(map){if(completed){jqXHR.always(map[jqXHR.status]);}else{for(code in map){statusCode[code]=[statusCode[code],map[code]];}}} return this;},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText);} done(0,finalText);return this;}};deferred.promise(jqXHR);s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];if(s.crossDomain==null){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url;urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host;}catch(e){s.crossDomain=true;}} if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);} inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(completed){return jqXHR;} fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");} s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url.replace(rhash,"");if(!s.hasContent){uncached=s.url.slice(cacheURL.length);if(s.data&&(s.processData||typeof s.data==="string")){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data;} if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+(nonce++)+uncached;} s.url=cacheURL+uncached;}else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+");} if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);} if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);}} if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);} jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+ (s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);} if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){return jqXHR.abort();} strAbort="abort";completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport");}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);} if(completed){return jqXHR;} if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout");},s.timeout);} try{completed=false;transport.send(requestHeaders,done);}catch(e){if(completed){throw e;} done(-1,e);}} function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(completed){return;} completed=true;if(timeoutTimer){window.clearTimeout(timeoutTimer);} transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses);} response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified;} modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified;}} if(status===204||s.type==="HEAD"){statusText="nocontent";}else if(status===304){statusText="notmodified";}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error;}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0;}}} jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);} jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]);} completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop");}}} return jqXHR;},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script");}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(isFunction(data)){type=type||callback;callback=data;data=undefined;} return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url));};});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:true,async:false,global:false,"throws":true});};jQuery.fn.extend({wrapAll:function(html){var wrap;if(this[0]){if(isFunction(html)){html=html.call(this[0]);} wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);} wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild;} return elem;}).append(this);} return this;},wrapInner:function(html){if(isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});} return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else{self.append(html);}});},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);});},unwrap:function(selector){this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes);});return this;}});jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem);};jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest();}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&("withCredentials"in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}} if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);} if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";} for(i in headers){xhr.setRequestHeader(i,headers[i]);} callback=function(type){return function(){if(callback){callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort();}else if(type==="error"){if(typeof xhr.status!=="number"){complete(0,"error");}else{complete(xhr.status,xhr.statusText);}}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,(xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders());}}};};xhr.onload=callback();errorCallback=xhr.onerror=xhr.ontimeout=callback("error");if(xhr.onabort!==undefined){xhr.onabort=errorCallback;}else{xhr.onreadystatechange=function(){if(xhr.readyState===4){window.setTimeout(function(){if(callback){errorCallback();}});}};} callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null);}catch(e){if(callback){throw e;}}},abort:function(){if(callback){callback();}}};}});jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false;}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){jQuery.globalEval(text);return text;}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;} if(s.crossDomain){s.type="GET";}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("');iframe_doc.close();iframe.location.hash=hash;}};})();return self;})();})(jQuery,this);; /* /web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js defined in bundle 'web.assets_common_lazy' */ (function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery","jquery-ui/sortable"],factory);}else{factory(window.jQuery);}}(function($){"use strict";function isOverAxis(x,reference,size){return(x>reference)&&(x<(reference+size));} $.widget("mjs.nestedSortable",$.extend({},$.ui.sortable.prototype,{options:{disableParentChange:false,doNotClear:false,expandOnHover:700,isAllowed:function(){return true;},isTree:false,listType:"ol",maxLevels:0,protectRoot:false,rootID:null,rtl:false,startCollapsed:false,tabSize:20,branchClass:"mjs-nestedSortable-branch",collapsedClass:"mjs-nestedSortable-collapsed",disableNestingClass:"mjs-nestedSortable-no-nesting",errorClass:"mjs-nestedSortable-error",expandedClass:"mjs-nestedSortable-expanded",hoveringClass:"mjs-nestedSortable-hovering",leafClass:"mjs-nestedSortable-leaf",disabledClass:"mjs-nestedSortable-disabled"},_create:function(){var self=this,err;this.element.data("ui-sortable",this.element.data("mjs-nestedSortable"));if(!this.element.is(this.options.listType)){err="nestedSortable: "+"Please check that the listType option is set to your actual list type";throw new Error(err);} if(this.options.isTree&&this.options.expandOnHover){this.options.tolerance="intersect";} $.ui.sortable.prototype._create.apply(this,arguments);if(this.options.isTree){$(this.items).each(function(){var $li=this.item,hasCollapsedClass=$li.hasClass(self.options.collapsedClass),hasExpandedClass=$li.hasClass(self.options.expandedClass);if($li.children(self.options.listType).length){$li.addClass(self.options.branchClass);if(!hasCollapsedClass&&!hasExpandedClass){if(self.options.startCollapsed){$li.addClass(self.options.collapsedClass);}else{$li.addClass(self.options.expandedClass);}}}else{$li.addClass(self.options.leafClass);}});}},_destroy:function(){this.element.removeData("mjs-nestedSortable").removeData("ui-sortable");return $.ui.sortable.prototype._destroy.apply(this,arguments);},_mouseDrag:function(event){var i,item,itemElement,intersection,self=this,o=this.options,scrolled=false,$document=$(document),previousTopOffset,parentItem,level,childLevels,itemAfter,itemBefore,newList,method,a,previousItem,nextItem,helperIsNotSibling;this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs;} if(this.options.scroll){if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){if((this.overflowOffset.top+ this.scrollParent[0].offsetHeight)- event.pageY=0;i--){item=this.items[i];itemElement=item.item[0];intersection=this._intersectsWithPointer(item);if(!intersection){continue;} if(item.instance!==this.currentContainer){continue;} if(itemElement.className.indexOf(o.disabledClass)!==-1){if(intersection===2){itemAfter=this.items[i+1];if(itemAfter&&itemAfter.item.hasClass(o.disabledClass)){continue;}}else if(intersection===1){itemBefore=this.items[i-1];if(itemBefore&&itemBefore.item.hasClass(o.disabledClass)){continue;}}} method=intersection===1?"next":"prev";if(itemElement!==this.currentItem[0]&&this.placeholder[method]()[0]!==itemElement&&!$.contains(this.placeholder[0],itemElement)&&(this.options.type==="semi-dynamic"?!$.contains(this.element[0],itemElement):true)){if(!this.mouseentered){$(itemElement).mouseenter();this.mouseentered=true;} if(o.isTree&&$(itemElement).hasClass(o.collapsedClass)&&o.expandOnHover){if(!this.hovering){$(itemElement).addClass(o.hoveringClass);this.hovering=window.setTimeout(function(){$(itemElement).removeClass(o.collapsedClass).addClass(o.expandedClass);self.refreshPositions();self._trigger("expand",event,self._uiHash());},o.expandOnHover);}} this.direction=intersection===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(item)){$(itemElement).mouseleave();this.mouseentered=false;$(itemElement).removeClass(o.hoveringClass);if(this.hovering){window.clearTimeout(this.hovering);} this.hovering=null;if(o.protectRoot&&!(this.currentItem[0].parentNode===this.element[0]&&itemElement.parentNode!==this.element[0])){if(this.currentItem[0].parentNode!==this.element[0]&&itemElement.parentNode===this.element[0]){if(!$(itemElement).children(o.listType).length){itemElement.appendChild(newList);if(o.isTree){$(itemElement).removeClass(o.leafClass).addClass(o.branchClass+" "+o.expandedClass);}} if(this.direction==="down"){a=$(itemElement).prev().children(o.listType);}else{a=$(itemElement).children(o.listType);} if(a[0]!==undefined){this._rearrange(event,null,a);}}else{this._rearrange(event,item);}}else if(!o.protectRoot){this._rearrange(event,item);}}else{break;} this._clearEmpty(itemElement);this._trigger("change",event,this._uiHash());break;}} (function(){var _previousItem=this.placeholder.prev();if(_previousItem.length){previousItem=_previousItem;}else{previousItem=null;}}.call(this));if(previousItem!=null){while(previousItem[0].nodeName.toLowerCase()!=="li"||previousItem[0].className.indexOf(o.disabledClass)!==-1||previousItem[0]===this.currentItem[0]||previousItem[0]===this.helper[0]){if(previousItem[0].previousSibling){previousItem=$(previousItem[0].previousSibling);}else{previousItem=null;break;}}} (function(){var _nextItem=this.placeholder.next();if(_nextItem.length){nextItem=_nextItem;}else{nextItem=null;}}.call(this));if(nextItem!=null){while(nextItem[0].nodeName.toLowerCase()!=="li"||nextItem[0].className.indexOf(o.disabledClass)!==-1||nextItem[0]===this.currentItem[0]||nextItem[0]===this.helper[0]){if(nextItem[0].nextSibling){nextItem=$(nextItem[0].nextSibling);}else{nextItem=null;break;}}} this.beyondMaxLevels=0;if(parentItem!=null&&nextItem==null&&!(o.protectRoot&&parentItem[0].parentNode==this.element[0])&&(o.rtl&&(this.positionAbs.left+ this.helper.outerWidth()>parentItem.offset().left+ parentItem.outerWidth())||!o.rtl&&(this.positionAbs.leftpreviousItem.offset().left+o.tabSize))){this._isAllowed(previousItem,level,level+childLevels+1);if(!previousItem.children(o.listType).length){previousItem[0].appendChild(newList);if(o.isTree){previousItem.removeClass(o.leafClass).addClass(o.branchClass+" "+o.expandedClass);}} if(previousTopOffset&&(previousTopOffset<=previousItem.offset().top)){previousItem.children(o.listType).prepend(this.placeholder);}else{previousItem.children(o.listType)[0].appendChild(this.placeholder[0]);} if(typeof parentItem!=='undefined') this._clearEmpty(parentItem[0]);this._trigger("change",event,this._uiHash());}else{this._isAllowed(parentItem,level,level+childLevels);} this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event);} this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false;},_mouseStop:function(event){if(this.beyondMaxLevels){this.placeholder.removeClass(this.options.errorClass);if(this.domPosition.prev){$(this.domPosition.prev).after(this.placeholder);}else{$(this.domPosition.parent).prepend(this.placeholder);} this._trigger("revert",event,this._uiHash());} $("."+this.options.hoveringClass).mouseleave().removeClass(this.options.hoveringClass);this.mouseentered=false;if(this.hovering){window.clearTimeout(this.hovering);} this.hovering=null;this._relocate_event=event;this._pid_current=$(this.domPosition.parent).parent().attr("id");this._sort_current=this.domPosition.prev?$(this.domPosition.prev).next().index():0;$.ui.sortable.prototype._mouseStop.apply(this,arguments);},_intersectsWithSides:function(item){var half=this.options.isTree?.8:.5,isOverBottomHalf=isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height*half),item.height),isOverTopHalf=isOverAxis(this.positionAbs.top+this.offset.click.top,item.top-(item.height*half),item.height),isOverRightHalf=isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection==="right"&&isOverRightHalf)||(horizontalDirection==="left"&&!isOverRightHalf));}else{return verticalDirection&&((verticalDirection==="down"&&isOverBottomHalf)||(verticalDirection==="up"&&isOverTopHalf));}},_contactContainers:function(){if(this.options.protectRoot&&this.currentItem[0].parentNode===this.element[0]){return;} $.ui.sortable.prototype._contactContainers.apply(this,arguments);},_clear:function(){var i,item;$.ui.sortable.prototype._clear.apply(this,arguments);if(!(this._pid_current===this._uiHash().item.parent().parent().attr("id")&&this._sort_current===this._uiHash().item.index())){this._trigger("relocate",this._relocate_event,this._uiHash());} for(i=this.items.length-1;i>=0;i--){item=this.items[i].item[0];this._clearEmpty(item);}},serialize:function(options){var o=$.extend({},this.options,options),items=this._getItemsAsjQuery(o&&o.connected),str=[];$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/)),pid=($(o.item||this).parent(o.listType).parent(o.items).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/));if(res){str.push(((o.key||res[1])+"["+ (o.key&&o.expression?res[1]:res[2])+"]")+"="+ (pid?(o.key&&o.expression?pid[1]:pid[2]):o.rootID));}});if(!str.length&&o.key){str.push(o.key+"=");} return str.join("&");},toHierarchy:function(options){var o=$.extend({},this.options,options),ret=[];$(this.element).children(o.items).each(function(){var level=_recursiveItems(this);ret.push(level);});return ret;function _recursiveItems(item){var id=($(item).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/)),currentItem;var data=$(item).data();if(data.nestedSortableItem){delete data.nestedSortableItem;} if(id){currentItem={"id":id[2]};currentItem=$.extend({},currentItem,data);if($(item).children(o.listType).children(o.items).length>0){currentItem.children=[];$(item).children(o.listType).children(o.items).each(function(){var level=_recursiveItems(this);currentItem.children.push(level);});} return currentItem;}}},toArray:function(options){var o=$.extend({},this.options,options),sDepth=o.startDepthCount||0,ret=[],left=1;if(!o.excludeRoot){ret.push({"item_id":o.rootID,"parent_id":null,"depth":sDepth,"left":left,"right":($(o.items,this.element).length+1)*2});left++;} $(this.element).children(o.items).each(function(){left=_recursiveArray(this,sDepth,left);});ret=ret.sort(function(a,b){return(a.left-b.left);});return ret;function _recursiveArray(item,depth,_left){var right=_left+1,id,pid,parentItem;if($(item).children(o.listType).children(o.items).length>0){depth++;$(item).children(o.listType).children(o.items).each(function(){right=_recursiveArray($(this),depth,right);});depth--;} id=($(item).attr(o.attribute||"id")).match(o.expression||(/(.+)[-=_](.+)/));if(depth===sDepth){pid=o.rootID;}else{parentItem=($(item).parent(o.listType).parent(o.items).attr(o.attribute||"id")).match(o.expression||(/(.+)[-=_](.+)/));pid=parentItem[2];} if(id){var data=$(item).children('div').data();var itemObj=$.extend(data,{"id":id[2],"parent_id":pid,"depth":depth,"left":_left,"right":right});ret.push(itemObj);} _left=right+1;return _left;}},_clearEmpty:function(item){function replaceClass(elem,search,replace,swap){if(swap){search=[replace,replace=search][0];} $(elem).removeClass(search).addClass(replace);} var o=this.options,childrenList=$(item).children(o.listType),hasChildren=childrenList.has('li').length;var doNotClear=o.doNotClear||hasChildren||o.protectRoot&&$(item)[0]===this.element[0];if(o.isTree){replaceClass(item,o.branchClass,o.leafClass,doNotClear);} if(!doNotClear){childrenList.parent().removeClass(o.expandedClass);childrenList.remove();}},_getLevel:function(item){var level=1,list;if(this.options.listType){list=item.closest(this.options.listType);while(list&&list.length>0&&!list.is(".ui-sortable")){level++;list=list.parent().closest(this.options.listType);}} return level;},_getChildLevels:function(parent,depth){var self=this,o=this.options,result=0;depth=depth||0;$(parent).children(o.listType).children(o.items).each(function(index,child){result=Math.max(self._getChildLevels(child,depth+1),result);});return depth?result+1:result;},_isAllowed:function(parentItem,level,levels){var o=this.options,maxLevels=this.placeholder.closest(".ui-sortable").nestedSortable("option","maxLevels"),oldParent=this.currentItem.parent().parent(),disabledByParentchange=o.disableParentChange&&(typeof parentItem!=='undefined'&&!oldParent.is(parentItem)||typeof parentItem==='undefined'&&oldParent.is("li"));if(disabledByParentchange||!o.isAllowed(this.placeholder,parentItem,this.currentItem)){this.placeholder.addClass(o.errorClass);if(maxLevels=0){timeoutDuration=1;break;}} function microtaskDebounce(fn){var called=false;return function(){if(called){return;} called=true;window.Promise.resolve().then(function(){called=false;fn();});};} function taskDebounce(fn){var scheduled=false;return function(){if(!scheduled){scheduled=true;setTimeout(function(){scheduled=false;fn();},timeoutDuration);}};} var supportsMicroTasks=isBrowser&&window.Promise;var debounce=supportsMicroTasks?microtaskDebounce:taskDebounce;function isFunction(functionToCheck){var getType={};return functionToCheck&&getType.toString.call(functionToCheck)==='[object Function]';} function getStyleComputedProperty(element,property){if(element.nodeType!==1){return[];} var css=getComputedStyle(element,null);return property?css[property]:css;} function getParentNode(element){if(element.nodeName==='HTML'){return element;} return element.parentNode||element.host;} function getScrollParent(element){if(!element){return document.body;} switch(element.nodeName){case'HTML':case'BODY':return element.ownerDocument.body;case'#document':return element.body;} var _getStyleComputedProp=getStyleComputedProperty(element),overflow=_getStyleComputedProp.overflow,overflowX=_getStyleComputedProp.overflowX,overflowY=_getStyleComputedProp.overflowY;if(/(auto|scroll|overlay)/.test(overflow+overflowY+overflowX)){return element;} return getScrollParent(getParentNode(element));} var isIE11=isBrowser&&!!(window.MSInputMethodContext&&document.documentMode);var isIE10=isBrowser&&/MSIE 10/.test(navigator.userAgent);function isIE(version){if(version===11){return isIE11;} if(version===10){return isIE10;} return isIE11||isIE10;} function getOffsetParent(element){if(!element){return document.documentElement;} var noOffsetParent=isIE(10)?document.body:null;var offsetParent=element.offsetParent;while(offsetParent===noOffsetParent&&element.nextElementSibling){offsetParent=(element=element.nextElementSibling).offsetParent;} var nodeName=offsetParent&&offsetParent.nodeName;if(!nodeName||nodeName==='BODY'||nodeName==='HTML'){return element?element.ownerDocument.documentElement:document.documentElement;} if(['TD','TABLE'].indexOf(offsetParent.nodeName)!==-1&&getStyleComputedProperty(offsetParent,'position')==='static'){return getOffsetParent(offsetParent);} return offsetParent;} function isOffsetContainer(element){var nodeName=element.nodeName;if(nodeName==='BODY'){return false;} return nodeName==='HTML'||getOffsetParent(element.firstElementChild)===element;} function getRoot(node){if(node.parentNode!==null){return getRoot(node.parentNode);} return node;} function findCommonOffsetParent(element1,element2){if(!element1||!element1.nodeType||!element2||!element2.nodeType){return document.documentElement;} var order=element1.compareDocumentPosition(element2)&Node.DOCUMENT_POSITION_FOLLOWING;var start=order?element1:element2;var end=order?element2:element1;var range=document.createRange();range.setStart(start,0);range.setEnd(end,0);var commonAncestorContainer=range.commonAncestorContainer;if(element1!==commonAncestorContainer&&element2!==commonAncestorContainer||start.contains(end)){if(isOffsetContainer(commonAncestorContainer)){return commonAncestorContainer;} return getOffsetParent(commonAncestorContainer);} var element1root=getRoot(element1);if(element1root.host){return findCommonOffsetParent(element1root.host,element2);}else{return findCommonOffsetParent(element1,getRoot(element2).host);}} function getScroll(element){var side=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'top';var upperSide=side==='top'?'scrollTop':'scrollLeft';var nodeName=element.nodeName;if(nodeName==='BODY'||nodeName==='HTML'){var html=element.ownerDocument.documentElement;var scrollingElement=element.ownerDocument.scrollingElement||html;return scrollingElement[upperSide];} return element[upperSide];} function includeScroll(rect,element){var subtract=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var scrollTop=getScroll(element,'top');var scrollLeft=getScroll(element,'left');var modifier=subtract?-1:1;rect.top+=scrollTop*modifier;rect.bottom+=scrollTop*modifier;rect.left+=scrollLeft*modifier;rect.right+=scrollLeft*modifier;return rect;} function getBordersSize(styles,axis){var sideA=axis==='x'?'Left':'Top';var sideB=sideA==='Left'?'Right':'Bottom';return parseFloat(styles['border'+sideA+'Width'],10)+parseFloat(styles['border'+sideB+'Width'],10);} function getSize(axis,body,html,computedStyle){return Math.max(body['offset'+axis],body['scroll'+axis],html['client'+axis],html['offset'+axis],html['scroll'+axis],isIE(10)?html['offset'+axis]+computedStyle['margin'+(axis==='Height'?'Top':'Left')]+computedStyle['margin'+(axis==='Height'?'Bottom':'Right')]:0);} function getWindowSizes(){var body=document.body;var html=document.documentElement;var computedStyle=isIE(10)&&getComputedStyle(html);return{height:getSize('Height',body,html,computedStyle),width:getSize('Width',body,html,computedStyle)};} var classCallCheck=function(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}};var createClass=function(){function defineProperties(target,props){for(var i=0;i2&&arguments[2]!==undefined?arguments[2]:false;var isIE10=isIE(10);var isHTML=parent.nodeName==='HTML';var childrenRect=getBoundingClientRect(children);var parentRect=getBoundingClientRect(parent);var scrollParent=getScrollParent(children);var styles=getStyleComputedProperty(parent);var borderTopWidth=parseFloat(styles.borderTopWidth,10);var borderLeftWidth=parseFloat(styles.borderLeftWidth,10);if(fixedPosition&&parent.nodeName==='HTML'){parentRect.top=Math.max(parentRect.top,0);parentRect.left=Math.max(parentRect.left,0);} var offsets=getClientRect({top:childrenRect.top-parentRect.top-borderTopWidth,left:childrenRect.left-parentRect.left-borderLeftWidth,width:childrenRect.width,height:childrenRect.height});offsets.marginTop=0;offsets.marginLeft=0;if(!isIE10&&isHTML){var marginTop=parseFloat(styles.marginTop,10);var marginLeft=parseFloat(styles.marginLeft,10);offsets.top-=borderTopWidth-marginTop;offsets.bottom-=borderTopWidth-marginTop;offsets.left-=borderLeftWidth-marginLeft;offsets.right-=borderLeftWidth-marginLeft;offsets.marginTop=marginTop;offsets.marginLeft=marginLeft;} if(isIE10&&!fixedPosition?parent.contains(scrollParent):parent===scrollParent&&scrollParent.nodeName!=='BODY'){offsets=includeScroll(offsets,parent);} return offsets;} function getViewportOffsetRectRelativeToArtbitraryNode(element){var excludeScroll=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var html=element.ownerDocument.documentElement;var relativeOffset=getOffsetRectRelativeToArbitraryNode(element,html);var width=Math.max(html.clientWidth,window.innerWidth||0);var height=Math.max(html.clientHeight,window.innerHeight||0);var scrollTop=!excludeScroll?getScroll(html):0;var scrollLeft=!excludeScroll?getScroll(html,'left'):0;var offset={top:scrollTop-relativeOffset.top+relativeOffset.marginTop,left:scrollLeft-relativeOffset.left+relativeOffset.marginLeft,width:width,height:height};return getClientRect(offset);} function isFixed(element){var nodeName=element.nodeName;if(nodeName==='BODY'||nodeName==='HTML'){return false;} if(getStyleComputedProperty(element,'position')==='fixed'){return true;} return isFixed(getParentNode(element));} function getFixedPositionOffsetParent(element){if(!element||!element.parentElement||isIE()){return document.documentElement;} var el=element.parentElement;while(el&&getStyleComputedProperty(el,'transform')==='none'){el=el.parentElement;} return el||document.documentElement;} function getBoundaries(popper,reference,padding,boundariesElement){var fixedPosition=arguments.length>4&&arguments[4]!==undefined?arguments[4]:false;var boundaries={top:0,left:0};var offsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,reference);if(boundariesElement==='viewport'){boundaries=getViewportOffsetRectRelativeToArtbitraryNode(offsetParent,fixedPosition);}else{var boundariesNode=void 0;if(boundariesElement==='scrollParent'){boundariesNode=getScrollParent(getParentNode(reference));if(boundariesNode.nodeName==='BODY'){boundariesNode=popper.ownerDocument.documentElement;}}else if(boundariesElement==='window'){boundariesNode=popper.ownerDocument.documentElement;}else{boundariesNode=boundariesElement;} var offsets=getOffsetRectRelativeToArbitraryNode(boundariesNode,offsetParent,fixedPosition);if(boundariesNode.nodeName==='HTML'&&!isFixed(offsetParent)){var _getWindowSizes=getWindowSizes(),height=_getWindowSizes.height,width=_getWindowSizes.width;boundaries.top+=offsets.top-offsets.marginTop;boundaries.bottom=height+offsets.top;boundaries.left+=offsets.left-offsets.marginLeft;boundaries.right=width+offsets.left;}else{boundaries=offsets;}} boundaries.left+=padding;boundaries.top+=padding;boundaries.right-=padding;boundaries.bottom-=padding;return boundaries;} function getArea(_ref){var width=_ref.width,height=_ref.height;return width*height;} function computeAutoPlacement(placement,refRect,popper,reference,boundariesElement){var padding=arguments.length>5&&arguments[5]!==undefined?arguments[5]:0;if(placement.indexOf('auto')===-1){return placement;} var boundaries=getBoundaries(popper,reference,padding,boundariesElement);var rects={top:{width:boundaries.width,height:refRect.top-boundaries.top},right:{width:boundaries.right-refRect.right,height:boundaries.height},bottom:{width:boundaries.width,height:boundaries.bottom-refRect.bottom},left:{width:refRect.left-boundaries.left,height:boundaries.height}};var sortedAreas=Object.keys(rects).map(function(key){return _extends({key:key},rects[key],{area:getArea(rects[key])});}).sort(function(a,b){return b.area-a.area;});var filteredAreas=sortedAreas.filter(function(_ref2){var width=_ref2.width,height=_ref2.height;return width>=popper.clientWidth&&height>=popper.clientHeight;});var computedPlacement=filteredAreas.length>0?filteredAreas[0].key:sortedAreas[0].key;var variation=placement.split('-')[1];return computedPlacement+(variation?'-'+variation:'');} function getReferenceOffsets(state,popper,reference){var fixedPosition=arguments.length>3&&arguments[3]!==undefined?arguments[3]:null;var commonOffsetParent=fixedPosition?getFixedPositionOffsetParent(popper):findCommonOffsetParent(popper,reference);return getOffsetRectRelativeToArbitraryNode(reference,commonOffsetParent,fixedPosition);} function getOuterSizes(element){var styles=getComputedStyle(element);var x=parseFloat(styles.marginTop)+parseFloat(styles.marginBottom);var y=parseFloat(styles.marginLeft)+parseFloat(styles.marginRight);var result={width:element.offsetWidth+y,height:element.offsetHeight+x};return result;} function getOppositePlacement(placement){var hash={left:'right',right:'left',bottom:'top',top:'bottom'};return placement.replace(/left|right|bottom|top/g,function(matched){return hash[matched];});} function getPopperOffsets(popper,referenceOffsets,placement){placement=placement.split('-')[0];var popperRect=getOuterSizes(popper);var popperOffsets={width:popperRect.width,height:popperRect.height};var isHoriz=['right','left'].indexOf(placement)!==-1;var mainSide=isHoriz?'top':'left';var secondarySide=isHoriz?'left':'top';var measurement=isHoriz?'height':'width';var secondaryMeasurement=!isHoriz?'height':'width';popperOffsets[mainSide]=referenceOffsets[mainSide]+referenceOffsets[measurement]/2-popperRect[measurement]/2;if(placement===secondarySide){popperOffsets[secondarySide]=referenceOffsets[secondarySide]-popperRect[secondaryMeasurement];}else{popperOffsets[secondarySide]=referenceOffsets[getOppositePlacement(secondarySide)];} return popperOffsets;} function find(arr,check){if(Array.prototype.find){return arr.find(check);} return arr.filter(check)[0];} function findIndex(arr,prop,value){if(Array.prototype.findIndex){return arr.findIndex(function(cur){return cur[prop]===value;});} var match=find(arr,function(obj){return obj[prop]===value;});return arr.indexOf(match);} function runModifiers(modifiers,data,ends){var modifiersToRun=ends===undefined?modifiers:modifiers.slice(0,findIndex(modifiers,'name',ends));modifiersToRun.forEach(function(modifier){if(modifier['function']){console.warn('`modifier.function` is deprecated, use `modifier.fn`!');} var fn=modifier['function']||modifier.fn;if(modifier.enabled&&isFunction(fn)){data.offsets.popper=getClientRect(data.offsets.popper);data.offsets.reference=getClientRect(data.offsets.reference);data=fn(data,modifier);}});return data;} function update(){if(this.state.isDestroyed){return;} var data={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:false,offsets:{}};data.offsets.reference=getReferenceOffsets(this.state,this.popper,this.reference,this.options.positionFixed);data.placement=computeAutoPlacement(this.options.placement,data.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);data.originalPlacement=data.placement;data.positionFixed=this.options.positionFixed;data.offsets.popper=getPopperOffsets(this.popper,data.offsets.reference,data.placement);data.offsets.popper.position=this.options.positionFixed?'fixed':'absolute';data=runModifiers(this.modifiers,data);if(!this.state.isCreated){this.state.isCreated=true;this.options.onCreate(data);}else{this.options.onUpdate(data);}} function isModifierEnabled(modifiers,modifierName){return modifiers.some(function(_ref){var name=_ref.name,enabled=_ref.enabled;return enabled&&name===modifierName;});} function getSupportedPropertyName(property){var prefixes=[false,'ms','Webkit','Moz','O'];var upperProp=property.charAt(0).toUpperCase()+property.slice(1);for(var i=0;ipopper[opSide]){data.offsets.popper[side]+=reference[side]+arrowElementSize-popper[opSide];} data.offsets.popper=getClientRect(data.offsets.popper);var center=reference[side]+reference[len]/2-arrowElementSize/2;var css=getStyleComputedProperty(data.instance.popper);var popperMarginSide=parseFloat(css['margin'+sideCapitalized],10);var popperBorderSide=parseFloat(css['border'+sideCapitalized+'Width'],10);var sideValue=center-data.offsets.popper[side]-popperMarginSide-popperBorderSide;sideValue=Math.max(Math.min(popper[len]-arrowElementSize,sideValue),0);data.arrowElement=arrowElement;data.offsets.arrow=(_data$offsets$arrow={},defineProperty(_data$offsets$arrow,side,Math.round(sideValue)),defineProperty(_data$offsets$arrow,altSide,''),_data$offsets$arrow);return data;} function getOppositeVariation(variation){if(variation==='end'){return'start';}else if(variation==='start'){return'end';} return variation;} var placements=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'];var validPlacements=placements.slice(3);function clockwise(placement){var counter=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var index=validPlacements.indexOf(placement);var arr=validPlacements.slice(index+1).concat(validPlacements.slice(0,index));return counter?arr.reverse():arr;} var BEHAVIORS={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'};function flip(data,options){if(isModifierEnabled(data.instance.modifiers,'inner')){return data;} if(data.flipped&&data.placement===data.originalPlacement){return data;} var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,options.boundariesElement,data.positionFixed);var placement=data.placement.split('-')[0];var placementOpposite=getOppositePlacement(placement);var variation=data.placement.split('-')[1]||'';var flipOrder=[];switch(options.behavior){case BEHAVIORS.FLIP:flipOrder=[placement,placementOpposite];break;case BEHAVIORS.CLOCKWISE:flipOrder=clockwise(placement);break;case BEHAVIORS.COUNTERCLOCKWISE:flipOrder=clockwise(placement,true);break;default:flipOrder=options.behavior;} flipOrder.forEach(function(step,index){if(placement!==step||flipOrder.length===index+1){return data;} placement=data.placement.split('-')[0];placementOpposite=getOppositePlacement(placement);var popperOffsets=data.offsets.popper;var refOffsets=data.offsets.reference;var floor=Math.floor;var overlapsRef=placement==='left'&&floor(popperOffsets.right)>floor(refOffsets.left)||placement==='right'&&floor(popperOffsets.left)floor(refOffsets.top)||placement==='bottom'&&floor(popperOffsets.top)floor(boundaries.right);var overflowsTop=floor(popperOffsets.top)floor(boundaries.bottom);var overflowsBoundaries=placement==='left'&&overflowsLeft||placement==='right'&&overflowsRight||placement==='top'&&overflowsTop||placement==='bottom'&&overflowsBottom;var isVertical=['top','bottom'].indexOf(placement)!==-1;var flippedVariation=!!options.flipVariations&&(isVertical&&variation==='start'&&overflowsLeft||isVertical&&variation==='end'&&overflowsRight||!isVertical&&variation==='start'&&overflowsTop||!isVertical&&variation==='end'&&overflowsBottom);if(overlapsRef||overflowsBoundaries||flippedVariation){data.flipped=true;if(overlapsRef||overflowsBoundaries){placement=flipOrder[index+1];} if(flippedVariation){variation=getOppositeVariation(variation);} data.placement=placement+(variation?'-'+variation:'');data.offsets.popper=_extends({},data.offsets.popper,getPopperOffsets(data.instance.popper,data.offsets.reference,data.placement));data=runModifiers(data.instance.modifiers,data,'flip');}});return data;} function keepTogether(data){var _data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var placement=data.placement.split('-')[0];var floor=Math.floor;var isVertical=['top','bottom'].indexOf(placement)!==-1;var side=isVertical?'right':'bottom';var opSide=isVertical?'left':'top';var measurement=isVertical?'width':'height';if(popper[side]floor(reference[side])){data.offsets.popper[opSide]=floor(reference[side]);} return data;} function toValue(str,measurement,popperOffsets,referenceOffsets){var split=str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);var value=+split[1];var unit=split[2];if(!value){return str;} if(unit.indexOf('%')===0){var element=void 0;switch(unit){case'%p':element=popperOffsets;break;case'%':case'%r':default:element=referenceOffsets;} var rect=getClientRect(element);return rect[measurement]/100*value;}else if(unit==='vh'||unit==='vw'){var size=void 0;if(unit==='vh'){size=Math.max(document.documentElement.clientHeight,window.innerHeight||0);}else{size=Math.max(document.documentElement.clientWidth,window.innerWidth||0);} return size/100*value;}else{return value;}} function parseOffset(offset,popperOffsets,referenceOffsets,basePlacement){var offsets=[0,0];var useHeight=['right','left'].indexOf(basePlacement)!==-1;var fragments=offset.split(/(\+|\-)/).map(function(frag){return frag.trim();});var divider=fragments.indexOf(find(fragments,function(frag){return frag.search(/,|\s/)!==-1;}));if(fragments[divider]&&fragments[divider].indexOf(',')===-1){console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');} var splitRegex=/\s*,\s*|\s+/;var ops=divider!==-1?[fragments.slice(0,divider).concat([fragments[divider].split(splitRegex)[0]]),[fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider+1))]:[fragments];ops=ops.map(function(op,index){var measurement=(index===1?!useHeight:useHeight)?'height':'width';var mergeWithPrevious=false;return op.reduce(function(a,b){if(a[a.length-1]===''&&['+','-'].indexOf(b)!==-1){a[a.length-1]=b;mergeWithPrevious=true;return a;}else if(mergeWithPrevious){a[a.length-1]+=b;mergeWithPrevious=false;return a;}else{return a.concat(b);}},[]).map(function(str){return toValue(str,measurement,popperOffsets,referenceOffsets);});});ops.forEach(function(op,index){op.forEach(function(frag,index2){if(isNumeric(frag)){offsets[index]+=frag*(op[index2-1]==='-'?-1:1);}});});return offsets;} function offset(data,_ref){var offset=_ref.offset;var placement=data.placement,_data$offsets=data.offsets,popper=_data$offsets.popper,reference=_data$offsets.reference;var basePlacement=placement.split('-')[0];var offsets=void 0;if(isNumeric(+offset)){offsets=[+offset,0];}else{offsets=parseOffset(offset,popper,reference,basePlacement);} if(basePlacement==='left'){popper.top+=offsets[0];popper.left-=offsets[1];}else if(basePlacement==='right'){popper.top+=offsets[0];popper.left+=offsets[1];}else if(basePlacement==='top'){popper.left+=offsets[0];popper.top-=offsets[1];}else if(basePlacement==='bottom'){popper.left+=offsets[0];popper.top+=offsets[1];} data.popper=popper;return data;} function preventOverflow(data,options){var boundariesElement=options.boundariesElement||getOffsetParent(data.instance.popper);if(data.instance.reference===boundariesElement){boundariesElement=getOffsetParent(boundariesElement);} var transformProp=getSupportedPropertyName('transform');var popperStyles=data.instance.popper.style;var top=popperStyles.top,left=popperStyles.left,transform=popperStyles[transformProp];popperStyles.top='';popperStyles.left='';popperStyles[transformProp]='';var boundaries=getBoundaries(data.instance.popper,data.instance.reference,options.padding,boundariesElement,data.positionFixed);popperStyles.top=top;popperStyles.left=left;popperStyles[transformProp]=transform;options.boundaries=boundaries;var order=options.priority;var popper=data.offsets.popper;var check={primary:function primary(placement){var value=popper[placement];if(popper[placement]boundaries[placement]&&!options.escapeWithReference){value=Math.min(popper[mainSide],boundaries[placement]-(placement==='right'?popper.width:popper.height));} return defineProperty({},mainSide,value);}};order.forEach(function(placement){var side=['left','top'].indexOf(placement)!==-1?'primary':'secondary';popper=_extends({},popper,check[side](placement));});data.offsets.popper=popper;return data;} function shift(data){var placement=data.placement;var basePlacement=placement.split('-')[0];var shiftvariation=placement.split('-')[1];if(shiftvariation){var _data$offsets=data.offsets,reference=_data$offsets.reference,popper=_data$offsets.popper;var isVertical=['bottom','top'].indexOf(basePlacement)!==-1;var side=isVertical?'left':'top';var measurement=isVertical?'width':'height';var shiftOffsets={start:defineProperty({},side,reference[side]),end:defineProperty({},side,reference[side]+reference[measurement]-popper[measurement])};data.offsets.popper=_extends({},popper,shiftOffsets[shiftvariation]);} return data;} function hide(data){if(!isModifierRequired(data.instance.modifiers,'hide','preventOverflow')){return data;} var refRect=data.offsets.reference;var bound=find(data.instance.modifiers,function(modifier){return modifier.name==='preventOverflow';}).boundaries;if(refRect.bottombound.right||refRect.top>bound.bottom||refRect.right2&&arguments[2]!==undefined?arguments[2]:{};classCallCheck(this,Popper);this.scheduleUpdate=function(){return requestAnimationFrame(_this.update);};this.update=debounce(this.update.bind(this));this.options=_extends({},Popper.Defaults,options);this.state={isDestroyed:false,isCreated:false,scrollParents:[]};this.reference=reference&&reference.jquery?reference[0]:reference;this.popper=popper&&popper.jquery?popper[0]:popper;this.options.modifiers={};Object.keys(_extends({},Popper.Defaults.modifiers,options.modifiers)).forEach(function(name){_this.options.modifiers[name]=_extends({},Popper.Defaults.modifiers[name]||{},options.modifiers?options.modifiers[name]:{});});this.modifiers=Object.keys(this.options.modifiers).map(function(name){return _extends({name:name},_this.options.modifiers[name]);}).sort(function(a,b){return a.order-b.order;});this.modifiers.forEach(function(modifierOptions){if(modifierOptions.enabled&&isFunction(modifierOptions.onLoad)){modifierOptions.onLoad(_this.reference,_this.popper,_this.options,modifierOptions,_this.state);}});this.update();var eventsEnabled=this.options.eventsEnabled;if(eventsEnabled){this.enableEventListeners();} this.state.eventsEnabled=eventsEnabled;} createClass(Popper,[{key:'update',value:function update$$1(){return update.call(this);}},{key:'destroy',value:function destroy$$1(){return destroy.call(this);}},{key:'enableEventListeners',value:function enableEventListeners$$1(){return enableEventListeners.call(this);}},{key:'disableEventListeners',value:function disableEventListeners$$1(){return disableEventListeners.call(this);}}]);return Popper;}();Popper.Utils=(typeof window!=='undefined'?window:global).PopperUtils;Popper.placements=placements;Popper.Defaults=Defaults;return Popper;})));; /* /web/static/lib/bootstrap/js/index.js defined in bundle 'web.assets_common_lazy' */ (function($){if(typeof $==='undefined'){throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');} var version=$.fn.jquery.split(' ')[0].split('.');var minMajor=1;var ltMajor=2;var minMinor=9;var minPatch=1;var maxMajor=4;if(version[0]=maxMajor){throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');}})($);; /* /web/static/lib/bootstrap/js/util.js defined in bundle 'web.assets_common_lazy' */ (function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery')):typeof define==='function'&&define.amd?define(['jquery'],factory):(global=global||self,global.Util=factory(global.jQuery));}(this,function($){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;var TRANSITION_END='transitionend';var MAX_UID=1000000;var MILLISECONDS_MULTIPLIER=1000;function toType(obj){return{}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();} function getSpecialTransitionEndEvent(){return{bindType:TRANSITION_END,delegateType:TRANSITION_END,handle:function handle(event){if($(event.target).is(this)){return event.handleObj.handler.apply(this,arguments);} return undefined;}};} function transitionEndEmulator(duration){var _this=this;var called=false;$(this).one(Util.TRANSITION_END,function(){called=true;});setTimeout(function(){if(!called){Util.triggerTransitionEnd(_this);}},duration);return this;} function setTransitionEndSupport(){$.fn.emulateTransitionEnd=transitionEndEmulator;$.event.special[Util.TRANSITION_END]=getSpecialTransitionEndEvent();} var Util={TRANSITION_END:'bsTransitionEnd',getUID:function getUID(prefix){do{prefix+=~~(Math.random()*MAX_UID);}while(document.getElementById(prefix));return prefix;},getSelectorFromElement:function getSelectorFromElement(element){var selector=element.getAttribute('data-target');if(!selector||selector==='#'){var hrefAttr=element.getAttribute('href');selector=hrefAttr&&hrefAttr!=='#'?hrefAttr.trim():'';} try{return document.querySelector(selector)?selector:null;}catch(err){return null;}},getTransitionDurationFromElement:function getTransitionDurationFromElement(element){if(!element){return 0;} var transitionDuration=$(element).css('transition-duration');var transitionDelay=$(element).css('transition-delay');var floatTransitionDuration=parseFloat(transitionDuration);var floatTransitionDelay=parseFloat(transitionDelay);if(!floatTransitionDuration&&!floatTransitionDelay){return 0;} transitionDuration=transitionDuration.split(',')[0];transitionDelay=transitionDelay.split(',')[0];return(parseFloat(transitionDuration)+parseFloat(transitionDelay))*MILLISECONDS_MULTIPLIER;},reflow:function reflow(element){return element.offsetHeight;},triggerTransitionEnd:function triggerTransitionEnd(element){$(element).trigger(TRANSITION_END);},supportsTransitionEnd:function supportsTransitionEnd(){return Boolean(TRANSITION_END);},isElement:function isElement(obj){return(obj[0]||obj).nodeType;},typeCheckConfig:function typeCheckConfig(componentName,config,configTypes){for(var property in configTypes){if(Object.prototype.hasOwnProperty.call(configTypes,property)){var expectedTypes=configTypes[property];var value=config[property];var valueType=value&&Util.isElement(value)?'element':toType(value);if(!new RegExp(expectedTypes).test(valueType)){throw new Error(componentName.toUpperCase()+": "+("Option \""+property+"\" provided type \""+valueType+"\" ")+("but expected type \""+expectedTypes+"\"."));}}}},findShadowRoot:function findShadowRoot(element){if(!document.documentElement.attachShadow){return null;} if(typeof element.getRootNode==='function'){var root=element.getRootNode();return root instanceof ShadowRoot?root:null;} if(element instanceof ShadowRoot){return element;} if(!element.parentNode){return null;} return Util.findShadowRoot(element.parentNode);}};setTransitionEndSupport();return Util;}));; /* /web/static/lib/bootstrap/js/alert.js defined in bundle 'web.assets_common_lazy' */ (function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Alert=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i0;this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent);this._addEventListeners();} var _proto=Carousel.prototype;_proto.next=function next(){if(!this._isSliding){this._slide(Direction.NEXT);}};_proto.nextWhenVisible=function nextWhenVisible(){if(!document.hidden&&$(this._element).is(':visible')&&$(this._element).css('visibility')!=='hidden'){this.next();}};_proto.prev=function prev(){if(!this._isSliding){this._slide(Direction.PREV);}};_proto.pause=function pause(event){if(!event){this._isPaused=true;} if(this._element.querySelector(Selector.NEXT_PREV)){Util.triggerTransitionEnd(this._element);this.cycle(true);} clearInterval(this._interval);this._interval=null;};_proto.cycle=function cycle(event){if(!event){this._isPaused=false;} if(this._interval){clearInterval(this._interval);this._interval=null;} if(this._config.interval&&!this._isPaused){this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval);}};_proto.to=function to(index){var _this=this;this._activeElement=this._element.querySelector(Selector.ACTIVE_ITEM);var activeIndex=this._getItemIndex(this._activeElement);if(index>this._items.length-1||index<0){return;} if(this._isSliding){$(this._element).one(Event.SLID,function(){return _this.to(index);});return;} if(activeIndex===index){this.pause();this.cycle();return;} var direction=index>activeIndex?Direction.NEXT:Direction.PREV;this._slide(direction,this._items[index]);};_proto.dispose=function dispose(){$(this._element).off(EVENT_KEY);$.removeData(this._element,DATA_KEY);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null;};_proto._getConfig=function _getConfig(config){config=_objectSpread({},Default,config);Util.typeCheckConfig(NAME,config,DefaultType);return config;};_proto._handleSwipe=function _handleSwipe(){var absDeltax=Math.abs(this.touchDeltaX);if(absDeltax<=SWIPE_THRESHOLD){return;} var direction=absDeltax/this.touchDeltaX;if(direction>0){this.prev();} if(direction<0){this.next();}};_proto._addEventListeners=function _addEventListeners(){var _this2=this;if(this._config.keyboard){$(this._element).on(Event.KEYDOWN,function(event){return _this2._keydown(event);});} if(this._config.pause==='hover'){$(this._element).on(Event.MOUSEENTER,function(event){return _this2.pause(event);}).on(Event.MOUSELEAVE,function(event){return _this2.cycle(event);});} if(this._config.touch){this._addTouchEventListeners();}};_proto._addTouchEventListeners=function _addTouchEventListeners(){var _this3=this;if(!this._touchSupported){return;} var start=function start(event){if(_this3._pointerEvent&&PointerType[event.originalEvent.pointerType.toUpperCase()]){_this3.touchStartX=event.originalEvent.clientX;}else if(!_this3._pointerEvent){_this3.touchStartX=event.originalEvent.touches[0].clientX;}};var move=function move(event){if(event.originalEvent.touches&&event.originalEvent.touches.length>1){_this3.touchDeltaX=0;}else{_this3.touchDeltaX=event.originalEvent.touches[0].clientX-_this3.touchStartX;}};var end=function end(event){if(_this3._pointerEvent&&PointerType[event.originalEvent.pointerType.toUpperCase()]){_this3.touchDeltaX=event.originalEvent.clientX-_this3.touchStartX;} _this3._handleSwipe();if(_this3._config.pause==='hover'){_this3.pause();if(_this3.touchTimeout){clearTimeout(_this3.touchTimeout);} _this3.touchTimeout=setTimeout(function(event){return _this3.cycle(event);},TOUCHEVENT_COMPAT_WAIT+_this3._config.interval);}};$(this._element.querySelectorAll(Selector.ITEM_IMG)).on(Event.DRAG_START,function(e){return e.preventDefault();});if(this._pointerEvent){$(this._element).on(Event.POINTERDOWN,function(event){return start(event);});$(this._element).on(Event.POINTERUP,function(event){return end(event);});this._element.classList.add(ClassName.POINTER_EVENT);}else{$(this._element).on(Event.TOUCHSTART,function(event){return start(event);});$(this._element).on(Event.TOUCHMOVE,function(event){return move(event);});$(this._element).on(Event.TOUCHEND,function(event){return end(event);});}};_proto._keydown=function _keydown(event){if(/input|textarea/i.test(event.target.tagName)){return;} switch(event.which){case ARROW_LEFT_KEYCODE:event.preventDefault();this.prev();break;case ARROW_RIGHT_KEYCODE:event.preventDefault();this.next();break;default:}};_proto._getItemIndex=function _getItemIndex(element){this._items=element&&element.parentNode?[].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)):[];return this._items.indexOf(element);};_proto._getItemByDirection=function _getItemByDirection(direction,activeElement){var isNextDirection=direction===Direction.NEXT;var isPrevDirection=direction===Direction.PREV;var activeIndex=this._getItemIndex(activeElement);var lastItemIndex=this._items.length-1;var isGoingToWrap=isPrevDirection&&activeIndex===0||isNextDirection&&activeIndex===lastItemIndex;if(isGoingToWrap&&!this._config.wrap){return activeElement;} var delta=direction===Direction.PREV?-1:1;var itemIndex=(activeIndex+delta)%this._items.length;return itemIndex===-1?this._items[this._items.length-1]:this._items[itemIndex];};_proto._triggerSlideEvent=function _triggerSlideEvent(relatedTarget,eventDirectionName){var targetIndex=this._getItemIndex(relatedTarget);var fromIndex=this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));var slideEvent=$.Event(Event.SLIDE,{relatedTarget:relatedTarget,direction:eventDirectionName,from:fromIndex,to:targetIndex});$(this._element).trigger(slideEvent);return slideEvent;};_proto._setActiveIndicatorElement=function _setActiveIndicatorElement(element){if(this._indicatorsElement){var indicators=[].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));$(indicators).removeClass(ClassName.ACTIVE);var nextIndicator=this._indicatorsElement.children[this._getItemIndex(element)];if(nextIndicator){$(nextIndicator).addClass(ClassName.ACTIVE);}}};_proto._slide=function _slide(direction,element){var _this4=this;var activeElement=this._element.querySelector(Selector.ACTIVE_ITEM);var activeElementIndex=this._getItemIndex(activeElement);var nextElement=element||activeElement&&this._getItemByDirection(direction,activeElement);var nextElementIndex=this._getItemIndex(nextElement);var isCycling=Boolean(this._interval);var directionalClassName;var orderClassName;var eventDirectionName;if(direction===Direction.NEXT){directionalClassName=ClassName.LEFT;orderClassName=ClassName.NEXT;eventDirectionName=Direction.LEFT;}else{directionalClassName=ClassName.RIGHT;orderClassName=ClassName.PREV;eventDirectionName=Direction.RIGHT;} if(nextElement&&$(nextElement).hasClass(ClassName.ACTIVE)){this._isSliding=false;return;} var slideEvent=this._triggerSlideEvent(nextElement,eventDirectionName);if(slideEvent.isDefaultPrevented()){return;} if(!activeElement||!nextElement){return;} this._isSliding=true;if(isCycling){this.pause();} this._setActiveIndicatorElement(nextElement);var slidEvent=$.Event(Event.SLID,{relatedTarget:nextElement,direction:eventDirectionName,from:activeElementIndex,to:nextElementIndex});if($(this._element).hasClass(ClassName.SLIDE)){$(nextElement).addClass(orderClassName);Util.reflow(nextElement);$(activeElement).addClass(directionalClassName);$(nextElement).addClass(directionalClassName);var nextElementInterval=parseInt(nextElement.getAttribute('data-interval'),10);if(nextElementInterval){this._config.defaultInterval=this._config.defaultInterval||this._config.interval;this._config.interval=nextElementInterval;}else{this._config.interval=this._config.defaultInterval||this._config.interval;} var transitionDuration=Util.getTransitionDurationFromElement(activeElement);$(activeElement).one(Util.TRANSITION_END,function(){$(nextElement).removeClass(directionalClassName+" "+orderClassName).addClass(ClassName.ACTIVE);$(activeElement).removeClass(ClassName.ACTIVE+" "+orderClassName+" "+directionalClassName);_this4._isSliding=false;setTimeout(function(){return $(_this4._element).trigger(slidEvent);},0);}).emulateTransitionEnd(transitionDuration);}else{$(activeElement).removeClass(ClassName.ACTIVE);$(nextElement).addClass(ClassName.ACTIVE);this._isSliding=false;$(this._element).trigger(slidEvent);} if(isCycling){this.cycle();}};Carousel._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=_objectSpread({},Default,$(this).data());if(typeof config==='object'){_config=_objectSpread({},_config,config);} var action=typeof config==='string'?config:_config.slide;if(!data){data=new Carousel(this,_config);$(this).data(DATA_KEY,data);} if(typeof config==='number'){data.to(config);}else if(typeof action==='string'){if(typeof data[action]==='undefined'){throw new TypeError("No method named \""+action+"\"");} data[action]();}else if(_config.interval&&_config.ride){data.pause();data.cycle();}});};Carousel._dataApiClickHandler=function _dataApiClickHandler(event){var selector=Util.getSelectorFromElement(this);if(!selector){return;} var target=$(selector)[0];if(!target||!$(target).hasClass(ClassName.CAROUSEL)){return;} var config=_objectSpread({},$(target).data(),$(this).data());var slideIndex=this.getAttribute('data-slide-to');if(slideIndex){config.interval=false;} Carousel._jQueryInterface.call($(target),config);if(slideIndex){$(target).data(DATA_KEY).to(slideIndex);} event.preventDefault();};_createClass(Carousel,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}}]);return Carousel;}();$(document).on(Event.CLICK_DATA_API,Selector.DATA_SLIDE,Carousel._dataApiClickHandler);$(window).on(Event.LOAD_DATA_API,function(){var carousels=[].slice.call(document.querySelectorAll(Selector.DATA_RIDE));for(var i=0,len=carousels.length;i0){this._selector=selector;this._triggerArray.push(elem);}} this._parent=this._config.parent?this._getParent():null;if(!this._config.parent){this._addAriaAndCollapsedClass(this._element,this._triggerArray);} if(this._config.toggle){this.toggle();}} var _proto=Collapse.prototype;_proto.toggle=function toggle(){if($(this._element).hasClass(ClassName.SHOW)){this.hide();}else{this.show();}};_proto.show=function show(){var _this=this;if(this._isTransitioning||$(this._element).hasClass(ClassName.SHOW)){return;} var actives;var activesData;if(this._parent){actives=[].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function(elem){if(typeof _this._config.parent==='string'){return elem.getAttribute('data-parent')===_this._config.parent;} return elem.classList.contains(ClassName.COLLAPSE);});if(actives.length===0){actives=null;}} if(actives){activesData=$(actives).not(this._selector).data(DATA_KEY);if(activesData&&activesData._isTransitioning){return;}} var startEvent=$.Event(Event.SHOW);$(this._element).trigger(startEvent);if(startEvent.isDefaultPrevented()){return;} if(actives){Collapse._jQueryInterface.call($(actives).not(this._selector),'hide');if(!activesData){$(actives).data(DATA_KEY,null);}} var dimension=this._getDimension();$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);this._element.style[dimension]=0;if(this._triggerArray.length){$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded',true);} this.setTransitioning(true);var complete=function complete(){$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);_this._element.style[dimension]='';_this.setTransitioning(false);$(_this._element).trigger(Event.SHOWN);};var capitalizedDimension=dimension[0].toUpperCase()+dimension.slice(1);var scrollSize="scroll"+capitalizedDimension;var transitionDuration=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);this._element.style[dimension]=this._element[scrollSize]+"px";};_proto.hide=function hide(){var _this2=this;if(this._isTransitioning||!$(this._element).hasClass(ClassName.SHOW)){return;} var startEvent=$.Event(Event.HIDE);$(this._element).trigger(startEvent);if(startEvent.isDefaultPrevented()){return;} var dimension=this._getDimension();this._element.style[dimension]=this._element.getBoundingClientRect()[dimension]+"px";Util.reflow(this._element);$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);var triggerArrayLength=this._triggerArray.length;if(triggerArrayLength>0){for(var i=0;i0;};_proto._getOffset=function _getOffset(){var _this2=this;var offset={};if(typeof this._config.offset==='function'){offset.fn=function(data){data.offsets=_objectSpread({},data.offsets,_this2._config.offset(data.offsets,_this2._element)||{});return data;};}else{offset.offset=this._config.offset;} return offset;};_proto._getPopperConfig=function _getPopperConfig(){var popperConfig={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};if(this._config.display==='static'){popperConfig.modifiers.applyStyle={enabled:false};} return popperConfig;};Dropdown._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=typeof config==='object'?config:null;if(!data){data=new Dropdown(this,_config);$(this).data(DATA_KEY,data);} if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");} data[config]();}});};Dropdown._clearMenus=function _clearMenus(event){if(event&&(event.which===RIGHT_MOUSE_BUTTON_WHICH||event.type==='keyup'&&event.which!==TAB_KEYCODE)){return;} var toggles=[].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));for(var i=0,len=toggles.length;i0){index--;} if(event.which===ARROW_DOWN_KEYCODE&&indexdocument.documentElement.clientHeight;if(!this._isBodyOverflowing&&isModalOverflowing){this._element.style.paddingLeft=this._scrollbarWidth+"px";} if(this._isBodyOverflowing&&!isModalOverflowing){this._element.style.paddingRight=this._scrollbarWidth+"px";}};_proto._resetAdjustments=function _resetAdjustments(){this._element.style.paddingLeft='';this._element.style.paddingRight='';};_proto._checkScrollbar=function _checkScrollbar(){var rect=document.body.getBoundingClientRect();this._isBodyOverflowing=rect.left+rect.right'+'
'+'
',trigger:'hover focus',title:'',delay:0,html:false,selector:false,placement:'top',offset:0,container:false,fallbackPlacement:'flip',boundary:'scrollParent',sanitize:true,sanitizeFn:null,whiteList:DefaultWhitelist};var HoverState={SHOW:'show',OUT:'out'};var Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,INSERTED:"inserted"+EVENT_KEY,CLICK:"click"+EVENT_KEY,FOCUSIN:"focusin"+EVENT_KEY,FOCUSOUT:"focusout"+EVENT_KEY,MOUSEENTER:"mouseenter"+EVENT_KEY,MOUSELEAVE:"mouseleave"+EVENT_KEY};var ClassName={FADE:'fade',SHOW:'show'};var Selector={TOOLTIP:'.tooltip',TOOLTIP_INNER:'.tooltip-inner',ARROW:'.arrow'};var Trigger={HOVER:'hover',FOCUS:'focus',CLICK:'click',MANUAL:'manual'};var Tooltip=function(){function Tooltip(element,config){if(typeof Popper==='undefined'){throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');} this._isEnabled=true;this._timeout=0;this._hoverState='';this._activeTrigger={};this._popper=null;this.element=element;this.config=this._getConfig(config);this.tip=null;this._setListeners();} var _proto=Tooltip.prototype;_proto.enable=function enable(){this._isEnabled=true;};_proto.disable=function disable(){this._isEnabled=false;};_proto.toggleEnabled=function toggleEnabled(){this._isEnabled=!this._isEnabled;};_proto.toggle=function toggle(event){if(!this._isEnabled){return;} if(event){var dataKey=this.constructor.DATA_KEY;var context=$(event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$(event.currentTarget).data(dataKey,context);} context._activeTrigger.click=!context._activeTrigger.click;if(context._isWithActiveTrigger()){context._enter(null,context);}else{context._leave(null,context);}}else{if($(this.getTipElement()).hasClass(ClassName.SHOW)){this._leave(null,this);return;} this._enter(null,this);}};_proto.dispose=function dispose(){clearTimeout(this._timeout);$.removeData(this.element,this.constructor.DATA_KEY);$(this.element).off(this.constructor.EVENT_KEY);$(this.element).closest('.modal').off('hide.bs.modal');if(this.tip){$(this.tip).remove();} this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;if(this._popper!==null){this._popper.destroy();} this._popper=null;this.element=null;this.config=null;this.tip=null;};_proto.show=function show(){var _this=this;if($(this.element).css('display')==='none'){throw new Error('Please use show on visible elements');} var showEvent=$.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){$(this.element).trigger(showEvent);var shadowRoot=Util.findShadowRoot(this.element);var isInTheDom=$.contains(shadowRoot!==null?shadowRoot:this.element.ownerDocument.documentElement,this.element);if(showEvent.isDefaultPrevented()||!isInTheDom){return;} var tip=this.getTipElement();var tipId=Util.getUID(this.constructor.NAME);tip.setAttribute('id',tipId);this.element.setAttribute('aria-describedby',tipId);this.setContent();if(this.config.animation){$(tip).addClass(ClassName.FADE);} var placement=typeof this.config.placement==='function'?this.config.placement.call(this,tip,this.element):this.config.placement;var attachment=this._getAttachment(placement);this.addAttachmentClass(attachment);var container=this._getContainer();$(tip).data(this.constructor.DATA_KEY,this);if(!$.contains(this.element.ownerDocument.documentElement,this.tip)){$(tip).appendTo(container);} $(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new Popper(this.element,tip,{placement:attachment,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Selector.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function onCreate(data){if(data.originalPlacement!==data.placement){_this._handlePopperPlacementChange(data);}},onUpdate:function onUpdate(data){return _this._handlePopperPlacementChange(data);}});$(tip).addClass(ClassName.SHOW);if('ontouchstart'in document.documentElement){$(document.body).children().on('mouseover',null,$.noop);} var complete=function complete(){if(_this.config.animation){_this._fixTransition();} var prevHoverState=_this._hoverState;_this._hoverState=null;$(_this.element).trigger(_this.constructor.Event.SHOWN);if(prevHoverState===HoverState.OUT){_this._leave(null,_this);}};if($(this.tip).hasClass(ClassName.FADE)){var transitionDuration=Util.getTransitionDurationFromElement(this.tip);$(this.tip).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();}}};_proto.hide=function hide(callback){var _this2=this;var tip=this.getTipElement();var hideEvent=$.Event(this.constructor.Event.HIDE);var complete=function complete(){if(_this2._hoverState!==HoverState.SHOW&&tip.parentNode){tip.parentNode.removeChild(tip);} _this2._cleanTipClass();_this2.element.removeAttribute('aria-describedby');$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);if(_this2._popper!==null){_this2._popper.destroy();} if(callback){callback();}};$(this.element).trigger(hideEvent);if(hideEvent.isDefaultPrevented()){return;} $(tip).removeClass(ClassName.SHOW);if('ontouchstart'in document.documentElement){$(document.body).children().off('mouseover',null,$.noop);} this._activeTrigger[Trigger.CLICK]=false;this._activeTrigger[Trigger.FOCUS]=false;this._activeTrigger[Trigger.HOVER]=false;if($(this.tip).hasClass(ClassName.FADE)){var transitionDuration=Util.getTransitionDurationFromElement(tip);$(tip).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();} this._hoverState='';};_proto.update=function update(){if(this._popper!==null){this._popper.scheduleUpdate();}};_proto.isWithContent=function isWithContent(){return Boolean(this.getTitle());};_proto.addAttachmentClass=function addAttachmentClass(attachment){$(this.getTipElement()).addClass(CLASS_PREFIX+"-"+attachment);};_proto.getTipElement=function getTipElement(){this.tip=this.tip||$(this.config.template)[0];return this.tip;};_proto.setContent=function setContent(){var tip=this.getTipElement();this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)),this.getTitle());$(tip).removeClass(ClassName.FADE+" "+ClassName.SHOW);};_proto.setElementContent=function setElementContent($element,content){if(typeof content==='object'&&(content.nodeType||content.jquery)){if(this.config.html){if(!$(content).parent().is($element)){$element.empty().append(content);}}else{$element.text($(content).text());} return;} if(this.config.html){if(this.config.sanitize){content=sanitizeHtml(content,this.config.whiteList,this.config.sanitizeFn);} $element.html(content);}else{$element.text(content);}};_proto.getTitle=function getTitle(){var title=this.element.getAttribute('data-original-title');if(!title){title=typeof this.config.title==='function'?this.config.title.call(this.element):this.config.title;} return title;};_proto._getOffset=function _getOffset(){var _this3=this;var offset={};if(typeof this.config.offset==='function'){offset.fn=function(data){data.offsets=_objectSpread({},data.offsets,_this3.config.offset(data.offsets,_this3.element)||{});return data;};}else{offset.offset=this.config.offset;} return offset;};_proto._getContainer=function _getContainer(){if(this.config.container===false){return document.body;} if(Util.isElement(this.config.container)){return $(this.config.container);} return $(document).find(this.config.container);};_proto._getAttachment=function _getAttachment(placement){return AttachmentMap[placement.toUpperCase()];};_proto._setListeners=function _setListeners(){var _this4=this;var triggers=this.config.trigger.split(' ');triggers.forEach(function(trigger){if(trigger==='click'){$(_this4.element).on(_this4.constructor.Event.CLICK,_this4.config.selector,function(event){return _this4.toggle(event);});}else if(trigger!==Trigger.MANUAL){var eventIn=trigger===Trigger.HOVER?_this4.constructor.Event.MOUSEENTER:_this4.constructor.Event.FOCUSIN;var eventOut=trigger===Trigger.HOVER?_this4.constructor.Event.MOUSELEAVE:_this4.constructor.Event.FOCUSOUT;$(_this4.element).on(eventIn,_this4.config.selector,function(event){return _this4._enter(event);}).on(eventOut,_this4.config.selector,function(event){return _this4._leave(event);});}});$(this.element).closest('.modal').on('hide.bs.modal',function(){if(_this4.element){_this4.hide();}});if(this.config.selector){this.config=_objectSpread({},this.config,{trigger:'manual',selector:''});}else{this._fixTitle();}};_proto._fixTitle=function _fixTitle(){var titleType=typeof this.element.getAttribute('data-original-title');if(this.element.getAttribute('title')||titleType!=='string'){this.element.setAttribute('data-original-title',this.element.getAttribute('title')||'');this.element.setAttribute('title','');}};_proto._enter=function _enter(event,context){var dataKey=this.constructor.DATA_KEY;context=context||$(event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$(event.currentTarget).data(dataKey,context);} if(event){context._activeTrigger[event.type==='focusin'?Trigger.FOCUS:Trigger.HOVER]=true;} if($(context.getTipElement()).hasClass(ClassName.SHOW)||context._hoverState===HoverState.SHOW){context._hoverState=HoverState.SHOW;return;} clearTimeout(context._timeout);context._hoverState=HoverState.SHOW;if(!context.config.delay||!context.config.delay.show){context.show();return;} context._timeout=setTimeout(function(){if(context._hoverState===HoverState.SHOW){context.show();}},context.config.delay.show);};_proto._leave=function _leave(event,context){var dataKey=this.constructor.DATA_KEY;context=context||$(event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$(event.currentTarget).data(dataKey,context);} if(event){context._activeTrigger[event.type==='focusout'?Trigger.FOCUS:Trigger.HOVER]=false;} if(context._isWithActiveTrigger()){return;} clearTimeout(context._timeout);context._hoverState=HoverState.OUT;if(!context.config.delay||!context.config.delay.hide){context.hide();return;} context._timeout=setTimeout(function(){if(context._hoverState===HoverState.OUT){context.hide();}},context.config.delay.hide);};_proto._isWithActiveTrigger=function _isWithActiveTrigger(){for(var trigger in this._activeTrigger){if(this._activeTrigger[trigger]){return true;}} return false;};_proto._getConfig=function _getConfig(config){var dataAttributes=$(this.element).data();Object.keys(dataAttributes).forEach(function(dataAttr){if(DISALLOWED_ATTRIBUTES.indexOf(dataAttr)!==-1){delete dataAttributes[dataAttr];}});config=_objectSpread({},this.constructor.Default,dataAttributes,typeof config==='object'&&config?config:{});if(typeof config.delay==='number'){config.delay={show:config.delay,hide:config.delay};} if(typeof config.title==='number'){config.title=config.title.toString();} if(typeof config.content==='number'){config.content=config.content.toString();} Util.typeCheckConfig(NAME,config,this.constructor.DefaultType);if(config.sanitize){config.template=sanitizeHtml(config.template,config.whiteList,config.sanitizeFn);} return config;};_proto._getDelegateConfig=function _getDelegateConfig(){var config={};if(this.config){for(var key in this.config){if(this.constructor.Default[key]!==this.config[key]){config[key]=this.config[key];}}} return config;};_proto._cleanTipClass=function _cleanTipClass(){var $tip=$(this.getTipElement());var tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX);if(tabClass!==null&&tabClass.length){$tip.removeClass(tabClass.join(''));}};_proto._handlePopperPlacementChange=function _handlePopperPlacementChange(popperData){var popperInstance=popperData.instance;this.tip=popperInstance.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(popperData.placement));};_proto._fixTransition=function _fixTransition(){var tip=this.getTipElement();var initConfigAnimation=this.config.animation;if(tip.getAttribute('x-placement')!==null){return;} $(tip).removeClass(ClassName.FADE);this.config.animation=false;this.hide();this.show();this.config.animation=initConfigAnimation;};Tooltip._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=typeof config==='object'&&config;if(!data&&/dispose|hide/.test(config)){return;} if(!data){data=new Tooltip(this,_config);$(this).data(DATA_KEY,data);} if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");} data[config]();}});};_createClass(Tooltip,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}},{key:"NAME",get:function get(){return NAME;}},{key:"DATA_KEY",get:function get(){return DATA_KEY;}},{key:"Event",get:function get(){return Event;}},{key:"EVENT_KEY",get:function get(){return EVENT_KEY;}},{key:"DefaultType",get:function get(){return DefaultType;}}]);return Tooltip;}();$.fn[NAME]=Tooltip._jQueryInterface;$.fn[NAME].Constructor=Tooltip;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Tooltip._jQueryInterface;};return Tooltip;}));; /* /web/static/lib/bootstrap/js/popover.js defined in bundle 'web.assets_common_lazy' */ (function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./tooltip.js')):typeof define==='function'&&define.amd?define(['jquery','./tooltip.js'],factory):(global=global||self,global.Popover=factory(global.jQuery,global.Tooltip));}(this,function($,Tooltip){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Tooltip=Tooltip&&Tooltip.hasOwnProperty('default')?Tooltip['default']:Tooltip;function _defineProperties(target,props){for(var i=0;i'+'
'+'

'+'
'});var DefaultType=_objectSpread({},Tooltip.DefaultType,{content:'(string|element|function)'});var ClassName={FADE:'fade',SHOW:'show'};var Selector={TITLE:'.popover-header',CONTENT:'.popover-body'};var Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,INSERTED:"inserted"+EVENT_KEY,CLICK:"click"+EVENT_KEY,FOCUSIN:"focusin"+EVENT_KEY,FOCUSOUT:"focusout"+EVENT_KEY,MOUSEENTER:"mouseenter"+EVENT_KEY,MOUSELEAVE:"mouseleave"+EVENT_KEY};var Popover=function(_Tooltip){_inheritsLoose(Popover,_Tooltip);function Popover(){return _Tooltip.apply(this,arguments)||this;} var _proto=Popover.prototype;_proto.isWithContent=function isWithContent(){return this.getTitle()||this._getContent();};_proto.addAttachmentClass=function addAttachmentClass(attachment){$(this.getTipElement()).addClass(CLASS_PREFIX+"-"+attachment);};_proto.getTipElement=function getTipElement(){this.tip=this.tip||$(this.config.template)[0];return this.tip;};_proto.setContent=function setContent(){var $tip=$(this.getTipElement());this.setElementContent($tip.find(Selector.TITLE),this.getTitle());var content=this._getContent();if(typeof content==='function'){content=content.call(this.element);} this.setElementContent($tip.find(Selector.CONTENT),content);$tip.removeClass(ClassName.FADE+" "+ClassName.SHOW);};_proto._getContent=function _getContent(){return this.element.getAttribute('data-content')||this.config.content;};_proto._cleanTipClass=function _cleanTipClass(){var $tip=$(this.getTipElement());var tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX);if(tabClass!==null&&tabClass.length>0){$tip.removeClass(tabClass.join(''));}};Popover._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$(this).data(DATA_KEY);var _config=typeof config==='object'?config:null;if(!data&&/dispose|hide/.test(config)){return;} if(!data){data=new Popover(this,_config);$(this).data(DATA_KEY,data);} if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");} data[config]();}});};_createClass(Popover,null,[{key:"VERSION",get:function get(){return VERSION;}},{key:"Default",get:function get(){return Default;}},{key:"NAME",get:function get(){return NAME;}},{key:"DATA_KEY",get:function get(){return DATA_KEY;}},{key:"Event",get:function get(){return Event;}},{key:"EVENT_KEY",get:function get(){return EVENT_KEY;}},{key:"DefaultType",get:function get(){return DefaultType;}}]);return Popover;}(Tooltip);$.fn[NAME]=Popover._jQueryInterface;$.fn[NAME].Constructor=Popover;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Popover._jQueryInterface;};return Popover;}));; /* /web/static/lib/bootstrap/js/scrollspy.js defined in bundle 'web.assets_common_lazy' */ (function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.ScrollSpy=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i=maxScroll){var target=this._targets[this._targets.length-1];if(this._activeTarget!==target){this._activate(target);} return;} if(this._activeTarget&&scrollTop0){this._activeTarget=null;this._clear();return;} var offsetLength=this._offsets.length;for(var i=offsetLength;i--;){var isActiveTarget=this._activeTarget!==this._targets[i]&&scrollTop>=this._offsets[i]&&(typeof this._offsets[i+1]==='undefined'||scrollTop li > .active',DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:'.dropdown-toggle',DROPDOWN_ACTIVE_CHILD:'> .dropdown-menu .active'};var Tab=function(){function Tab(element){this._element=element;} var _proto=Tab.prototype;_proto.show=function show(){var _this=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$(this._element).hasClass(ClassName.ACTIVE)||$(this._element).hasClass(ClassName.DISABLED)){return;} var target;var previous;var listElement=$(this._element).closest(Selector.NAV_LIST_GROUP)[0];var selector=Util.getSelectorFromElement(this._element);if(listElement){var itemSelector=listElement.nodeName==='UL'||listElement.nodeName==='OL'?Selector.ACTIVE_UL:Selector.ACTIVE;previous=$.makeArray($(listElement).find(itemSelector));previous=previous[previous.length-1];} var hideEvent=$.Event(Event.HIDE,{relatedTarget:this._element});var showEvent=$.Event(Event.SHOW,{relatedTarget:previous});if(previous){$(previous).trigger(hideEvent);} $(this._element).trigger(showEvent);if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented()){return;} if(selector){target=document.querySelector(selector);} this._activate(this._element,listElement);var complete=function complete(){var hiddenEvent=$.Event(Event.HIDDEN,{relatedTarget:_this._element});var shownEvent=$.Event(Event.SHOWN,{relatedTarget:previous});$(previous).trigger(hiddenEvent);$(_this._element).trigger(shownEvent);};if(target){this._activate(target,target.parentNode,complete);}else{complete();}};_proto.dispose=function dispose(){$.removeData(this._element,DATA_KEY);this._element=null;};_proto._activate=function _activate(element,container,callback){var _this2=this;var activeElements=container&&(container.nodeName==='UL'||container.nodeName==='OL')?$(container).find(Selector.ACTIVE_UL):$(container).children(Selector.ACTIVE);var active=activeElements[0];var isTransitioning=callback&&active&&$(active).hasClass(ClassName.FADE);var complete=function complete(){return _this2._transitionComplete(element,active,callback);};if(active&&isTransitioning){var transitionDuration=Util.getTransitionDurationFromElement(active);$(active).removeClass(ClassName.SHOW).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration);}else{complete();}};_proto._transitionComplete=function _transitionComplete(element,active,callback){if(active){$(active).removeClass(ClassName.ACTIVE);var dropdownChild=$(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];if(dropdownChild){$(dropdownChild).removeClass(ClassName.ACTIVE);} if(active.getAttribute('role')==='tab'){active.setAttribute('aria-selected',false);}} $(element).addClass(ClassName.ACTIVE);if(element.getAttribute('role')==='tab'){element.setAttribute('aria-selected',true);} Util.reflow(element);if(element.classList.contains(ClassName.FADE)){element.classList.add(ClassName.SHOW);} if(element.parentNode&&$(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)){var dropdownElement=$(element).closest(Selector.DROPDOWN)[0];if(dropdownElement){var dropdownToggleList=[].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));$(dropdownToggleList).addClass(ClassName.ACTIVE);} element.setAttribute('aria-expanded',true);} if(callback){callback();}};Tab._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $this=$(this);var data=$this.data(DATA_KEY);if(!data){data=new Tab(this);$this.data(DATA_KEY,data);} if(typeof config==='string'){if(typeof data[config]==='undefined'){throw new TypeError("No method named \""+config+"\"");} data[config]();}});};_createClass(Tab,null,[{key:"VERSION",get:function get(){return VERSION;}}]);return Tab;}();$(document).on(Event.CLICK_DATA_API,Selector.DATA_TOGGLE,function(event){event.preventDefault();Tab._jQueryInterface.call($(this),'show');});$.fn[NAME]=Tab._jQueryInterface;$.fn[NAME].Constructor=Tab;$.fn[NAME].noConflict=function(){$.fn[NAME]=JQUERY_NO_CONFLICT;return Tab._jQueryInterface;};return Tab;}));; /* /web/static/lib/bootstrap/js/toast.js defined in bundle 'web.assets_common_lazy' */ (function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=global||self,global.Toast=factory(global.jQuery,global.Util));}(this,function($,Util){'use strict';$=$&&$.hasOwnProperty('default')?$['default']:$;Util=Util&&Util.hasOwnProperty('default')?Util['default']:Util;function _defineProperties(target,props){for(var i=0;i=4)){throw new Error('Tempus Dominus Bootstrap4\'s requires at least jQuery v3.0.0 but less than v4.0.0');}}(jQuery);if(typeof moment==='undefined'){throw new Error('Tempus Dominus Bootstrap4\'s requires moment.js. Moment.js must be included before Tempus Dominus Bootstrap4\'s JavaScript.');} var version=moment.version.split('.') if((version[0]<=2&&version[1]<17)||(version[0]>=3)){throw new Error('Tempus Dominus Bootstrap4\'s requires at least moment.js v2.17.0 but less than v3.0.0');} +function(){var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i1){for(var i=0;i1){throw new TypeError('isEnabled expects a single character string parameter');} switch(granularity){case'y':return this.actualFormat.indexOf('Y')!==-1;case'M':return this.actualFormat.indexOf('M')!==-1;case'd':return this.actualFormat.toLowerCase().indexOf('d')!==-1;case'h':case'H':return this.actualFormat.toLowerCase().indexOf('h')!==-1;case'm':return this.actualFormat.indexOf('m')!==-1;case's':return this.actualFormat.indexOf('s')!==-1;case'a':case'A':return this.actualFormat.toLowerCase().indexOf('a')!==-1;default:return false;}};DateTimePicker.prototype._hasTime=function _hasTime(){return this._isEnabled('h')||this._isEnabled('m')||this._isEnabled('s');};DateTimePicker.prototype._hasDate=function _hasDate(){return this._isEnabled('y')||this._isEnabled('M')||this._isEnabled('d');};DateTimePicker.prototype._dataToOptions=function _dataToOptions(){var eData=this._element.data();var dataOptions={};if(eData.dateOptions&&eData.dateOptions instanceof Object){dataOptions=$.extend(true,dataOptions,eData.dateOptions);} $.each(this._options,function(key){var attributeName='date'+key.charAt(0).toUpperCase()+key.slice(1);if(eData[attributeName]!==undefined){dataOptions[key]=eData[attributeName];}else{delete dataOptions[key];}});return dataOptions;};DateTimePicker.prototype._notifyEvent=function _notifyEvent(e){if(e.type===DateTimePicker.Event.CHANGE){if(!e.date&&!e.oldDate){return;} var bothUTC=e.date&&e.oldDate&&e.date._isUTC===e.oldDate._isUTC;if(bothUTC&&e.date.isSame(e.oldDate)){return;}} this._element.trigger(e);};DateTimePicker.prototype._viewUpdate=function _viewUpdate(e){if(e==='y'){e='YYYY';} this._notifyEvent({type:DateTimePicker.Event.UPDATE,change:e,viewDate:this._viewDate.clone()});};DateTimePicker.prototype._showMode=function _showMode(dir){if(!this.widget){return;} if(dir){this.currentViewMode=Math.max(MinViewModeNumber,Math.min(3,this.currentViewMode+dir));} this.widget.find('.datepicker > div').hide().filter('.datepicker-'+DatePickerModes[this.currentViewMode].CLASS_NAME).show();};DateTimePicker.prototype._isInDisabledDates=function _isInDisabledDates(testDate){return this._options.disabledDates[testDate.format('YYYY-MM-DD')]===true;};DateTimePicker.prototype._isInEnabledDates=function _isInEnabledDates(testDate){return this._options.enabledDates[testDate.format('YYYY-MM-DD')]===true;};DateTimePicker.prototype._isInDisabledHours=function _isInDisabledHours(testDate){return this._options.disabledHours[testDate.format('H')]===true;};DateTimePicker.prototype._isInEnabledHours=function _isInEnabledHours(testDate){return this._options.enabledHours[testDate.format('H')]===true;};DateTimePicker.prototype._isValid=function _isValid(targetMoment,granularity){if(!targetMoment.isValid()){return false;} if(this._options.disabledDates&&granularity==='d'&&this._isInDisabledDates(targetMoment)){return false;} if(this._options.enabledDates&&granularity==='d'&&!this._isInEnabledDates(targetMoment)){return false;} if(this._options.minDate&&targetMoment.isBefore(this._options.minDate,granularity)){return false;} if(this._options.maxDate&&targetMoment.isAfter(this._options.maxDate,granularity)){return false;} if(this._options.daysOfWeekDisabled&&granularity==='d'&&this._options.daysOfWeekDisabled.indexOf(targetMoment.day())!==-1){return false;} if(this._options.disabledHours&&(granularity==='h'||granularity==='m'||granularity==='s')&&this._isInDisabledHours(targetMoment)){return false;} if(this._options.enabledHours&&(granularity==='h'||granularity==='m'||granularity==='s')&&!this._isInEnabledHours(targetMoment)){return false;} if(this._options.disabledTimeIntervals&&(granularity==='h'||granularity==='m'||granularity==='s')){var found=false;$.each(this._options.disabledTimeIntervals,function(){if(targetMoment.isBetween(this[0],this[1])){found=true;return false;}});if(found){return false;}} return true;};DateTimePicker.prototype._parseInputDate=function _parseInputDate(inputDate){if(this._options.parseInputDate===undefined){if(!moment.isMoment(inputDate)){inputDate=this.getMoment(inputDate);}}else{inputDate=this._options.parseInputDate(inputDate);} return inputDate;};DateTimePicker.prototype._keydown=function _keydown(e){var handler=null,index=void 0,index2=void 0,keyBindKeys=void 0,allModifiersPressed=void 0;var pressedKeys=[],pressedModifiers={},currentKey=e.which,pressed='p';keyState[currentKey]=pressed;for(index in keyState){if(keyState.hasOwnProperty(index)&&keyState[index]===pressed){pressedKeys.push(index);if(parseInt(index,10)!==currentKey){pressedModifiers[index]=true;}}} for(index in this._options.keyBinds){if(this._options.keyBinds.hasOwnProperty(index)&&typeof this._options.keyBinds[index]==='function'){keyBindKeys=index.split(' ');if(keyBindKeys.length===pressedKeys.length&&KeyMap[currentKey]===keyBindKeys[keyBindKeys.length-1]){allModifiersPressed=true;for(index2=keyBindKeys.length-2;index2>=0;index2--){if(!(KeyMap[keyBindKeys[index2]]in pressedModifiers)){allModifiersPressed=false;break;}} if(allModifiersPressed){handler=this._options.keyBinds[index];break;}}}} if(handler){if(handler.call(this)){e.stopPropagation();e.preventDefault();}}};DateTimePicker.prototype._keyup=function _keyup(e){keyState[e.which]='r';if(keyPressHandled[e.which]){keyPressHandled[e.which]=false;e.stopPropagation();e.preventDefault();}};DateTimePicker.prototype._indexGivenDates=function _indexGivenDates(givenDatesArray){var givenDatesIndexed={},self=this;$.each(givenDatesArray,function(){var dDate=self._parseInputDate(this);if(dDate.isValid()){givenDatesIndexed[dDate.format('YYYY-MM-DD')]=true;}});return Object.keys(givenDatesIndexed).length?givenDatesIndexed:false;};DateTimePicker.prototype._indexGivenHours=function _indexGivenHours(givenHoursArray){var givenHoursIndexed={};$.each(givenHoursArray,function(){givenHoursIndexed[this]=true;});return Object.keys(givenHoursIndexed).length?givenHoursIndexed:false;};DateTimePicker.prototype._initFormatting=function _initFormatting(){var format=this._options.format||'L LT',self=this;this.actualFormat=format.replace(/(\[[^\[]*])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(formatInput){return self._dates[0].localeData().longDateFormat(formatInput)||formatInput;});this.parseFormats=this._options.extraFormats?this._options.extraFormats.slice():[];if(this.parseFormats.indexOf(format)<0&&this.parseFormats.indexOf(this.actualFormat)<0){this.parseFormats.push(this.actualFormat);} this.use24Hours=this.actualFormat.toLowerCase().indexOf('a')<1&&this.actualFormat.replace(/\[.*?]/g,'').indexOf('h')<1;if(this._isEnabled('y')){MinViewModeNumber=2;} if(this._isEnabled('M')){MinViewModeNumber=1;} if(this._isEnabled('d')){MinViewModeNumber=0;} this.currentViewMode=Math.max(MinViewModeNumber,this.currentViewMode);if(!this.unset){this._setValue(this._dates[0],0);}};DateTimePicker.prototype._getLastPickedDate=function _getLastPickedDate(){return this._dates[this._getLastPickedDateIndex()]||this.getMoment();};DateTimePicker.prototype._getLastPickedDateIndex=function _getLastPickedDateIndex(){return this._dates.length-1;};DateTimePicker.prototype.getMoment=function getMoment(d){var returnMoment=void 0;if(d===undefined||d===null){returnMoment=moment();}else if(this._hasTimeZone()){returnMoment=moment.tz(d,this.parseFormats,this._options.locale,this._options.useStrict,this._options.timeZone);}else{returnMoment=moment(d,this.parseFormats,this._options.locale,this._options.useStrict);} if(this._hasTimeZone()){returnMoment.tz(this._options.timeZone);} return returnMoment;};DateTimePicker.prototype.toggle=function toggle(){return this.widget?this.hide():this.show();};DateTimePicker.prototype.ignoreReadonly=function ignoreReadonly(_ignoreReadonly){if(arguments.length===0){return this._options.ignoreReadonly;} if(typeof _ignoreReadonly!=='boolean'){throw new TypeError('ignoreReadonly () expects a boolean parameter');} this._options.ignoreReadonly=_ignoreReadonly;};DateTimePicker.prototype.options=function options(newOptions){if(arguments.length===0){return $.extend(true,{},this._options);} if(!(newOptions instanceof Object)){throw new TypeError('options() this.options parameter should be an object');} $.extend(true,this._options,newOptions);var self=this;$.each(this._options,function(key,value){if(self[key]!==undefined){self[key](value);}});};DateTimePicker.prototype.date=function date(newDate,index){index=index||0;if(arguments.length===0){if(this.unset){return null;} if(this._options.allowMultidate){return this._dates.join(this._options.multidateSeparator);}else{return this._dates[index].clone();}} if(newDate!==null&&typeof newDate!=='string'&&!moment.isMoment(newDate)&&!(newDate instanceof Date)){throw new TypeError('date() parameter must be one of [null, string, moment or Date]');} this._setValue(newDate===null?null:this._parseInputDate(newDate),index);};DateTimePicker.prototype.format=function format(newFormat){if(arguments.length===0){return this._options.format;} if(typeof newFormat!=='string'&&(typeof newFormat!=='boolean'||newFormat!==false)){throw new TypeError('format() expects a string or boolean:false parameter '+newFormat);} this._options.format=newFormat;if(this.actualFormat){this._initFormatting();}};DateTimePicker.prototype.timeZone=function timeZone(newZone){if(arguments.length===0){return this._options.timeZone;} if(typeof newZone!=='string'){throw new TypeError('newZone() expects a string parameter');} this._options.timeZone=newZone;};DateTimePicker.prototype.dayViewHeaderFormat=function dayViewHeaderFormat(newFormat){if(arguments.length===0){return this._options.dayViewHeaderFormat;} if(typeof newFormat!=='string'){throw new TypeError('dayViewHeaderFormat() expects a string parameter');} this._options.dayViewHeaderFormat=newFormat;};DateTimePicker.prototype.extraFormats=function extraFormats(formats){if(arguments.length===0){return this._options.extraFormats;} if(formats!==false&&!(formats instanceof Array)){throw new TypeError('extraFormats() expects an array or false parameter');} this._options.extraFormats=formats;if(this.parseFormats){this._initFormatting();}};DateTimePicker.prototype.disabledDates=function disabledDates(dates){if(arguments.length===0){return this._options.disabledDates?$.extend({},this._options.disabledDates):this._options.disabledDates;} if(!dates){this._options.disabledDates=false;this._update();return true;} if(!(dates instanceof Array)){throw new TypeError('disabledDates() expects an array parameter');} this._options.disabledDates=this._indexGivenDates(dates);this._options.enabledDates=false;this._update();};DateTimePicker.prototype.enabledDates=function enabledDates(dates){if(arguments.length===0){return this._options.enabledDates?$.extend({},this._options.enabledDates):this._options.enabledDates;} if(!dates){this._options.enabledDates=false;this._update();return true;} if(!(dates instanceof Array)){throw new TypeError('enabledDates() expects an array parameter');} this._options.enabledDates=this._indexGivenDates(dates);this._options.disabledDates=false;this._update();};DateTimePicker.prototype.daysOfWeekDisabled=function daysOfWeekDisabled(_daysOfWeekDisabled){if(arguments.length===0){return this._options.daysOfWeekDisabled.splice(0);} if(typeof _daysOfWeekDisabled==='boolean'&&!_daysOfWeekDisabled){this._options.daysOfWeekDisabled=false;this._update();return true;} if(!(_daysOfWeekDisabled instanceof Array)){throw new TypeError('daysOfWeekDisabled() expects an array parameter');} this._options.daysOfWeekDisabled=_daysOfWeekDisabled.reduce(function(previousValue,currentValue){currentValue=parseInt(currentValue,10);if(currentValue>6||currentValue<0||isNaN(currentValue)){return previousValue;} if(previousValue.indexOf(currentValue)===-1){previousValue.push(currentValue);} return previousValue;},[]).sort();if(this._options.useCurrent&&!this._options.keepInvalid){for(var i=0;i1){throw new TypeError('multidateSeparator expects a single character string parameter');} this._options.multidateSeparator=_multidateSeparator;};_createClass(DateTimePicker,null,[{key:'NAME',get:function get(){return NAME;}},{key:'DATA_KEY',get:function get(){return DATA_KEY;}},{key:'EVENT_KEY',get:function get(){return EVENT_KEY;}},{key:'DATA_API_KEY',get:function get(){return DATA_API_KEY;}},{key:'DatePickerModes',get:function get(){return DatePickerModes;}},{key:'ViewModes',get:function get(){return ViewModes;}},{key:'MinViewModeNumber',get:function get(){return MinViewModeNumber;}},{key:'Event',get:function get(){return Event;}},{key:'Selector',get:function get(){return Selector;}},{key:'Default',get:function get(){return Default;},set:function set(value){Default=value;}},{key:'ClassName',get:function get(){return ClassName;}}]);return DateTimePicker;}();return DateTimePicker;}(jQuery,moment);var TempusDominusBootstrap4=function($){var JQUERY_NO_CONFLICT=$.fn[DateTimePicker.NAME],verticalModes=['top','bottom','auto'],horizontalModes=['left','right','auto'],toolbarPlacements=['default','top','bottom'],getSelectorFromElement=function getSelectorFromElement($element){var selector=$element.data('target'),$selector=void 0;if(!selector){selector=$element.attr('href')||'';selector=/^#[a-z]/i.test(selector)?selector:null;} $selector=$(selector);if($selector.length===0){return $selector;} if(!$selector.data(DateTimePicker.DATA_KEY)){$.extend({},$selector.data(),$(this).data());} return $selector;};var TempusDominusBootstrap4=function(_DateTimePicker){_inherits(TempusDominusBootstrap4,_DateTimePicker);function TempusDominusBootstrap4(element,options){_classCallCheck(this,TempusDominusBootstrap4);var _this=_possibleConstructorReturn(this,_DateTimePicker.call(this,element,options));_this._init();return _this;} TempusDominusBootstrap4.prototype._init=function _init(){if(this._element.hasClass('input-group')){var datepickerButton=this._element.find('.datepickerbutton');if(datepickerButton.length===0){this.component=this._element.find('[data-toggle="datetimepicker"]');}else{this.component=datepickerButton;}}};TempusDominusBootstrap4.prototype._getDatePickerTemplate=function _getDatePickerTemplate(){var headTemplate=$('').append($('').append($('').addClass('prev').attr('data-action','previous').append($('').addClass(this._options.icons.previous))).append($('').addClass('picker-switch').attr('data-action','pickerSwitch').attr('colspan',''+(this._options.calendarWeeks?'6':'5'))).append($('').addClass('next').attr('data-action','next').append($('').addClass(this._options.icons.next)))),contTemplate=$('').append($('').append($('').attr('colspan',''+(this._options.calendarWeeks?'8':'7'))));return[$('
').addClass('datepicker-days').append($('').addClass('table table-sm').append(headTemplate).append($(''))),$('
').addClass('datepicker-months').append($('
').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())),$('
').addClass('datepicker-years').append($('
').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone())),$('
').addClass('datepicker-decades').append($('
').addClass('table-condensed').append(headTemplate.clone()).append(contTemplate.clone()))];};TempusDominusBootstrap4.prototype._getTimePickerMainTemplate=function _getTimePickerMainTemplate(){var topRow=$(''),middleRow=$(''),bottomRow=$('');if(this._isEnabled('h')){topRow.append($('
').append($('').attr({href:'#',tabindex:'-1','title':this._options.tooltips.incrementHour}).addClass('btn').attr('data-action','incrementHours').append($('').addClass(this._options.icons.up))));middleRow.append($('').append($('').addClass('timepicker-hour').attr({'data-time-component':'hours','title':this._options.tooltips.pickHour}).attr('data-action','showHours')));bottomRow.append($('').append($('').attr({href:'#',tabindex:'-1','title':this._options.tooltips.decrementHour}).addClass('btn').attr('data-action','decrementHours').append($('').addClass(this._options.icons.down))));} if(this._isEnabled('m')){if(this._isEnabled('h')){topRow.append($('').addClass('separator'));middleRow.append($('').addClass('separator').html(':'));bottomRow.append($('').addClass('separator'));} topRow.append($('').append($('').attr({href:'#',tabindex:'-1','title':this._options.tooltips.incrementMinute}).addClass('btn').attr('data-action','incrementMinutes').append($('').addClass(this._options.icons.up))));middleRow.append($('').append($('').addClass('timepicker-minute').attr({'data-time-component':'minutes','title':this._options.tooltips.pickMinute}).attr('data-action','showMinutes')));bottomRow.append($('').append($('').attr({href:'#',tabindex:'-1','title':this._options.tooltips.decrementMinute}).addClass('btn').attr('data-action','decrementMinutes').append($('').addClass(this._options.icons.down))));} if(this._isEnabled('s')){if(this._isEnabled('m')){topRow.append($('').addClass('separator'));middleRow.append($('').addClass('separator').html(':'));bottomRow.append($('').addClass('separator'));} topRow.append($('').append($('').attr({href:'#',tabindex:'-1','title':this._options.tooltips.incrementSecond}).addClass('btn').attr('data-action','incrementSeconds').append($('').addClass(this._options.icons.up))));middleRow.append($('').append($('').addClass('timepicker-second').attr({'data-time-component':'seconds','title':this._options.tooltips.pickSecond}).attr('data-action','showSeconds')));bottomRow.append($('').append($('').attr({href:'#',tabindex:'-1','title':this._options.tooltips.decrementSecond}).addClass('btn').attr('data-action','decrementSeconds').append($('').addClass(this._options.icons.down))));} if(!this.use24Hours){topRow.append($('').addClass('separator'));middleRow.append($('').append($('').addClass('separator'));} return $('
').addClass('timepicker-picker').append($('').addClass('table-condensed').append([topRow,middleRow,bottomRow]));};TempusDominusBootstrap4.prototype._getTimePickerTemplate=function _getTimePickerTemplate(){var hoursView=$('
').addClass('timepicker-hours').append($('
').addClass('table-condensed')),minutesView=$('
').addClass('timepicker-minutes').append($('
').addClass('table-condensed')),secondsView=$('
').addClass('timepicker-seconds').append($('
').addClass('table-condensed')),ret=[this._getTimePickerMainTemplate()];if(this._isEnabled('h')){ret.push(hoursView);} if(this._isEnabled('m')){ret.push(minutesView);} if(this._isEnabled('s')){ret.push(secondsView);} return ret;};TempusDominusBootstrap4.prototype._getToolbar=function _getToolbar(){var row=[];if(this._options.buttons.showToday){row.push($('
').append($('').attr({href:'#',tabindex:'-1','data-action':'today','title':this._options.tooltips.today}).append($('').addClass(this._options.icons.today))));} if(!this._options.sideBySide&&this._hasDate()&&this._hasTime()){var title=void 0,icon=void 0;if(this._options.viewMode==='times'){title=this._options.tooltips.selectDate;icon=this._options.icons.date;}else{title=this._options.tooltips.selectTime;icon=this._options.icons.time;} row.push($('').append($('').attr({href:'#',tabindex:'-1','data-action':'togglePicker','title':title}).append($('').addClass(icon))));} if(this._options.buttons.showClear){row.push($('').append($('').attr({href:'#',tabindex:'-1','data-action':'clear','title':this._options.tooltips.clear}).append($('').addClass(this._options.icons.clear))));} if(this._options.buttons.showClose){row.push($('').append($('').attr({href:'#',tabindex:'-1','data-action':'close','title':this._options.tooltips.close}).append($('').addClass(this._options.icons.close))));} return row.length===0?'':$('').addClass('table-condensed').append($('').append($('').append(row)));};TempusDominusBootstrap4.prototype._getTemplate=function _getTemplate(){var template=$('
').addClass('bootstrap-datetimepicker-widget dropdown-menu'),dateView=$('
').addClass('datepicker').append(this._getDatePickerTemplate()),timeView=$('
').addClass('timepicker').append(this._getTimePickerTemplate()),content=$('
    ').addClass('list-unstyled'),toolbar=$('
  • ').addClass('picker-switch'+(this._options.collapse?' accordion-toggle':'')).append(this._getToolbar());if(this._options.inline){template.removeClass('dropdown-menu');} if(this.use24Hours){template.addClass('usetwentyfour');} if(this._isEnabled('s')&&!this.use24Hours){template.addClass('wider');} if(this._options.sideBySide&&this._hasDate()&&this._hasTime()){template.addClass('timepicker-sbs');if(this._options.toolbarPlacement==='top'){template.append(toolbar);} template.append($('
    ').addClass('row').append(dateView.addClass('col-md-6')).append(timeView.addClass('col-md-6')));if(this._options.toolbarPlacement==='bottom'||this._options.toolbarPlacement==='default'){template.append(toolbar);} return template;} if(this._options.toolbarPlacement==='top'){content.append(toolbar);} if(this._hasDate()){content.append($('
  • ').addClass(this._options.collapse&&this._hasTime()?'collapse':'').addClass(this._options.collapse&&this._hasTime()&&this._options.viewMode==='times'?'':'show').append(dateView));} if(this._options.toolbarPlacement==='default'){content.append(toolbar);} if(this._hasTime()){content.append($('
  • ').addClass(this._options.collapse&&this._hasDate()?'collapse':'').addClass(this._options.collapse&&this._hasDate()&&this._options.viewMode==='times'?'show':'').append(timeView));} if(this._options.toolbarPlacement==='bottom'){content.append(toolbar);} return template.append(content);};TempusDominusBootstrap4.prototype._place=function _place(e){var self=e&&e.data&&e.data.picker||this,vertical=self._options.widgetPositioning.vertical,horizontal=self._options.widgetPositioning.horizontal,parent=void 0;var position=(self.component&&self.component.length?self.component:self._element).position(),offset=(self.component&&self.component.length?self.component:self._element).offset();if(self._options.widgetParent){parent=self._options.widgetParent.append(self.widget);}else if(self._element.is('input')){parent=self._element.after(self.widget).parent();}else if(self._options.inline){parent=self._element.append(self.widget);return;}else{parent=self._element;self._element.children().first().after(self.widget);} var parentOffset=parent.offset();position.top=offset.top-parentOffset.top;position.left=offset.left-parentOffset.left;if(vertical==='auto'){if(offset.top+self.widget.height()*1.5>=$(window).height()+$(window).scrollTop()&&self.widget.height()+self._element.outerHeight()$(window).width()){horizontal='right';}else{horizontal='left';}} if(vertical==='top'){self.widget.addClass('top').removeClass('bottom');}else{self.widget.addClass('bottom').removeClass('top');} if(horizontal==='right'){self.widget.addClass('float-right');}else{self.widget.removeClass('float-right');} if(parent.css('position')!=='relative'){parent=parent.parents().filter(function(){return $(this).css('position')==='relative';}).first();} if(parent.length===0){throw new Error('datetimepicker component should be placed within a relative positioned container');} self.widget.css({top:vertical==='top'?'auto':position.top+self._element.outerHeight()+'px',bottom:vertical==='top'?parent.outerHeight()-(parent===self._element?0:position.top)+'px':'auto',left:horizontal==='left'?(parent===self._element?0:position.left)+'px':'auto',right:horizontal==='left'?'auto':parent.outerWidth()-self._element.outerWidth()-(parent===self._element?0:position.left)+'px'});};TempusDominusBootstrap4.prototype._fillDow=function _fillDow(){var row=$('
'),currentDate=this._viewDate.clone().startOf('w').startOf('d');if(this._options.calendarWeeks===true){row.append($('');if(this._options.calendarWeeks){row.append('');} html.push(row);} clsName='';if(currentDate.isBefore(this._viewDate,'M')){clsName+=' old';} if(currentDate.isAfter(this._viewDate,'M')){clsName+=' new';} if(this._options.allowMultidate){var index=this._datesFormatted.indexOf(currentDate.format('YYYY-MM-DD'));if(index!==-1){if(currentDate.isSame(this._datesFormatted[index],'d')&&!this.unset){clsName+=' active';}}}else{if(currentDate.isSame(this._getLastPickedDate(),'d')&&!this.unset){clsName+=' active';}} if(!this._isValid(currentDate,'d')){clsName+=' disabled';} if(currentDate.date()===now.date()&¤tDate.month()===now.month()&¤tDate.year()===now.year()){clsName+=' today';} if(currentDate.day()===0||currentDate.day()===6){clsName+=' weekend';} row.append('');currentDate.add(1,'d');} daysView.find('tbody').empty().append(html);this._updateMonths();this._updateYears();this._updateDecades();};TempusDominusBootstrap4.prototype._fillHours=function _fillHours(){var table=this.widget.find('.timepicker-hours table'),currentHour=this._viewDate.clone().startOf('d'),html=[];var row=$('');if(this._viewDate.hour()>11&&!this.use24Hours){currentHour.hour(12);} while(currentHour.isSame(this._viewDate,'d')&&(this.use24Hours||this._viewDate.hour()<12&¤tHour.hour()<12||this._viewDate.hour()>11)){if(currentHour.hour()%4===0){row=$('');html.push(row);} row.append('');currentHour.add(1,'h');} table.empty().append(html);};TempusDominusBootstrap4.prototype._fillMinutes=function _fillMinutes(){var table=this.widget.find('.timepicker-minutes table'),currentMinute=this._viewDate.clone().startOf('h'),html=[],step=this._options.stepping===1?5:this._options.stepping;var row=$('');while(this._viewDate.isSame(currentMinute,'h')){if(currentMinute.minute()%(step*4)===0){row=$('');html.push(row);} row.append('');currentMinute.add(step,'m');} table.empty().append(html);};TempusDominusBootstrap4.prototype._fillSeconds=function _fillSeconds(){var table=this.widget.find('.timepicker-seconds table'),currentSecond=this._viewDate.clone().startOf('m'),html=[];var row=$('');while(this._viewDate.isSame(currentSecond,'m')){if(currentSecond.second()%20===0){row=$('');html.push(row);} row.append('');currentSecond.add(5,'s');} table.empty().append(html);};TempusDominusBootstrap4.prototype._fillTime=function _fillTime(){var toggle=void 0,newDate=void 0;var timeComponents=this.widget.find('.timepicker span[data-time-component]');if(!this.use24Hours){toggle=this.widget.find('.timepicker [data-action=togglePeriod]');newDate=this._getLastPickedDate().clone().add(this._getLastPickedDate().hours()>=12?-12:12,'h');toggle.text(this._getLastPickedDate().format('A'));if(this._isValid(newDate,'h')){toggle.removeClass('disabled');}else{toggle.addClass('disabled');}} timeComponents.filter('[data-time-component=hours]').text(this._getLastPickedDate().format(''+(this.use24Hours?'HH':'hh')));timeComponents.filter('[data-time-component=minutes]').text(this._getLastPickedDate().format('mm'));timeComponents.filter('[data-time-component=seconds]').text(this._getLastPickedDate().format('ss'));this._fillHours();this._fillMinutes();this._fillSeconds();};TempusDominusBootstrap4.prototype._doAction=function _doAction(e,action){var lastPicked=this._getLastPickedDate();if($(e.currentTarget).is('.disabled')){return false;} action=action||$(e.currentTarget).data('action');switch(action){case'next':{var navFnc=DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.add(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP,navFnc);this._fillDate();this._viewUpdate(navFnc);break;} case'previous':{var _navFnc=DateTimePicker.DatePickerModes[this.currentViewMode].NAV_FUNCTION;this._viewDate.subtract(DateTimePicker.DatePickerModes[this.currentViewMode].NAV_STEP,_navFnc);this._fillDate();this._viewUpdate(_navFnc);break;} case'pickerSwitch':this._showMode(1);break;case'selectMonth':{var month=$(e.target).closest('tbody').find('span').index($(e.target));this._viewDate.month(month);if(this.currentViewMode===DateTimePicker.MinViewModeNumber){this._setValue(lastPicked.clone().year(this._viewDate.year()).month(this._viewDate.month()),this._getLastPickedDateIndex());if(!this._options.inline){this.hide();}}else{this._showMode(-1);this._fillDate();} this._viewUpdate('M');break;} case'selectYear':{var year=parseInt($(e.target).text(),10)||0;this._viewDate.year(year);if(this.currentViewMode===DateTimePicker.MinViewModeNumber){this._setValue(lastPicked.clone().year(this._viewDate.year()),this._getLastPickedDateIndex());if(!this._options.inline){this.hide();}}else{this._showMode(-1);this._fillDate();} this._viewUpdate('YYYY');break;} case'selectDecade':{var _year=parseInt($(e.target).data('selection'),10)||0;this._viewDate.year(_year);if(this.currentViewMode===DateTimePicker.MinViewModeNumber){this._setValue(lastPicked.clone().year(this._viewDate.year()),this._getLastPickedDateIndex());if(!this._options.inline){this.hide();}}else{this._showMode(-1);this._fillDate();} this._viewUpdate('YYYY');break;} case'selectDay':{var day=this._viewDate.clone();if($(e.target).is('.old')){day.subtract(1,'M');} if($(e.target).is('.new')){day.add(1,'M');} this._setValue(day.date(parseInt($(e.target).text(),10)),this._getLastPickedDateIndex());if(!this._hasTime()&&!this._options.keepOpen&&!this._options.inline){this.hide();} break;} case'incrementHours':{var newDate=lastPicked.clone().add(1,'h');if(this._isValid(newDate,'h')){this._setValue(newDate,this._getLastPickedDateIndex());} break;} case'incrementMinutes':{var _newDate=lastPicked.clone().add(this._options.stepping,'m');if(this._isValid(_newDate,'m')){this._setValue(_newDate,this._getLastPickedDateIndex());} break;} case'incrementSeconds':{var _newDate2=lastPicked.clone().add(1,'s');if(this._isValid(_newDate2,'s')){this._setValue(_newDate2,this._getLastPickedDateIndex());} break;} case'decrementHours':{var _newDate3=lastPicked.clone().subtract(1,'h');if(this._isValid(_newDate3,'h')){this._setValue(_newDate3,this._getLastPickedDateIndex());} break;} case'decrementMinutes':{var _newDate4=lastPicked.clone().subtract(this._options.stepping,'m');if(this._isValid(_newDate4,'m')){this._setValue(_newDate4,this._getLastPickedDateIndex());} break;} case'decrementSeconds':{var _newDate5=lastPicked.clone().subtract(1,'s');if(this._isValid(_newDate5,'s')){this._setValue(_newDate5,this._getLastPickedDateIndex());} break;} case'togglePeriod':{this._setValue(lastPicked.clone().add(lastPicked.hours()>=12?-12:12,'h'),this._getLastPickedDateIndex());break;} case'togglePicker':{var $this=$(e.target),$link=$this.closest('a'),$parent=$this.closest('ul'),expanded=$parent.find('.show'),closed=$parent.find('.collapse:not(.show)'),$span=$this.is('span')?$this:$this.find('span');var collapseData=void 0;if(expanded&&expanded.length){collapseData=expanded.data('collapse');if(collapseData&&collapseData.transitioning){return true;} if(expanded.collapse){expanded.collapse('hide');closed.collapse('show');}else{expanded.removeClass('show');closed.addClass('show');} $span.toggleClass(this._options.icons.time+' '+this._options.icons.date);if($span.hasClass(this._options.icons.date)){$link.attr('title',this._options.tooltips.selectDate);}else{$link.attr('title',this._options.tooltips.selectTime);}}} break;case'showPicker':this.widget.find('.timepicker > div:not(.timepicker-picker)').hide();this.widget.find('.timepicker .timepicker-picker').show();break;case'showHours':this.widget.find('.timepicker .timepicker-picker').hide();this.widget.find('.timepicker .timepicker-hours').show();break;case'showMinutes':this.widget.find('.timepicker .timepicker-picker').hide();this.widget.find('.timepicker .timepicker-minutes').show();break;case'showSeconds':this.widget.find('.timepicker .timepicker-picker').hide();this.widget.find('.timepicker .timepicker-seconds').show();break;case'selectHour':{var hour=parseInt($(e.target).text(),10);if(!this.use24Hours){if(lastPicked.hours()>=12){if(hour!==12){hour+=12;}}else{if(hour===12){hour=0;}}} this._setValue(lastPicked.clone().hours(hour),this._getLastPickedDateIndex());if(!this._isEnabled('a')&&!this._isEnabled('m')&&!this._options.keepOpen&&!this._options.inline){this.hide();}else{this._doAction(e,'showPicker');} break;} case'selectMinute':this._setValue(lastPicked.clone().minutes(parseInt($(e.target).text(),10)),this._getLastPickedDateIndex());if(!this._isEnabled('a')&&!this._isEnabled('s')&&!this._options.keepOpen&&!this._options.inline){this.hide();}else{this._doAction(e,'showPicker');} break;case'selectSecond':this._setValue(lastPicked.clone().seconds(parseInt($(e.target).text(),10)),this._getLastPickedDateIndex());if(!this._isEnabled('a')&&!this._options.keepOpen&&!this._options.inline){this.hide();}else{this._doAction(e,'showPicker');} break;case'clear':this.clear();break;case'close':this.hide();break;case'today':{var todaysDate=this.getMoment();if(this._isValid(todaysDate,'d')){this._setValue(todaysDate,this._getLastPickedDateIndex());} break;}} return false;};TempusDominusBootstrap4.prototype.hide=function hide(){var transitioning=false;if(!this.widget){return;} this.widget.find('.collapse').each(function(){var collapseData=$(this).data('collapse');if(collapseData&&collapseData.transitioning){transitioning=true;return false;} return true;});if(transitioning){return;} if(this.component&&this.component.hasClass('btn')){this.component.toggleClass('active');} this.widget.hide();$(window).off('resize',this._place());this.widget.off('click','[data-action]');this.widget.off('mousedown',false);this.widget.remove();this.widget=false;this._notifyEvent({type:DateTimePicker.Event.HIDE,date:this._getLastPickedDate().clone()});if(this.input!==undefined){this.input.blur();} this._viewDate=this._getLastPickedDate().clone();};TempusDominusBootstrap4.prototype.show=function show(){var currentMoment=void 0;var useCurrentGranularity={'year':function year(m){return m.month(0).date(1).hours(0).seconds(0).minutes(0);},'month':function month(m){return m.date(1).hours(0).seconds(0).minutes(0);},'day':function day(m){return m.hours(0).seconds(0).minutes(0);},'hour':function hour(m){return m.seconds(0).minutes(0);},'minute':function minute(m){return m.seconds(0);}};if(this.input!==undefined){if(this.input.prop('disabled')||!this._options.ignoreReadonly&&this.input.prop('readonly')||this.widget){return;} if(this.input.val()!==undefined&&this.input.val().trim().length!==0){this._setValue(this._parseInputDate(this.input.val().trim()),0);}else if(this.unset&&this._options.useCurrent){currentMoment=this.getMoment();if(typeof this._options.useCurrent==='string'){currentMoment=useCurrentGranularity[this._options.useCurrent](currentMoment);} this._setValue(currentMoment,0);}}else if(this.unset&&this._options.useCurrent){currentMoment=this.getMoment();if(typeof this._options.useCurrent==='string'){currentMoment=useCurrentGranularity[this._options.useCurrent](currentMoment);} this._setValue(currentMoment,0);} this.widget=this._getTemplate();this._fillDow();this._fillMonths();this.widget.find('.timepicker-hours').hide();this.widget.find('.timepicker-minutes').hide();this.widget.find('.timepicker-seconds').hide();this._update();this._showMode();$(window).on('resize',{picker:this},this._place);this.widget.on('click','[data-action]',$.proxy(this._doAction,this));this.widget.on('mousedown',false);if(this.component&&this.component.hasClass('btn')){this.component.toggleClass('active');} this._place();this.widget.show();if(this.input!==undefined&&this._options.focusOnShow&&!this.input.is(':focus')){this.input.focus();} this._notifyEvent({type:DateTimePicker.Event.SHOW});};TempusDominusBootstrap4.prototype.destroy=function destroy(){this.hide();this._element.removeData(DateTimePicker.DATA_KEY);this._element.removeData('date');};TempusDominusBootstrap4.prototype.disable=function disable(){this.hide();if(this.component&&this.component.hasClass('btn')){this.component.addClass('disabled');} if(this.input!==undefined){this.input.prop('disabled',true);}};TempusDominusBootstrap4.prototype.enable=function enable(){if(this.component&&this.component.hasClass('btn')){this.component.removeClass('disabled');} if(this.input!==undefined){this.input.prop('disabled',false);}};TempusDominusBootstrap4.prototype.toolbarPlacement=function toolbarPlacement(_toolbarPlacement){if(arguments.length===0){return this._options.toolbarPlacement;} if(typeof _toolbarPlacement!=='string'){throw new TypeError('toolbarPlacement() expects a string parameter');} if(toolbarPlacements.indexOf(_toolbarPlacement)===-1){throw new TypeError('toolbarPlacement() parameter must be one of ('+toolbarPlacements.join(', ')+') value');} this._options.toolbarPlacement=_toolbarPlacement;if(this.widget){this.hide();this.show();}};TempusDominusBootstrap4.prototype.widgetPositioning=function widgetPositioning(_widgetPositioning){if(arguments.length===0){return $.extend({},this._options.widgetPositioning);} if({}.toString.call(_widgetPositioning)!=='[object Object]'){throw new TypeError('widgetPositioning() expects an object variable');} if(_widgetPositioning.horizontal){if(typeof _widgetPositioning.horizontal!=='string'){throw new TypeError('widgetPositioning() horizontal variable must be a string');} _widgetPositioning.horizontal=_widgetPositioning.horizontal.toLowerCase();if(horizontalModes.indexOf(_widgetPositioning.horizontal)===-1){throw new TypeError('widgetPositioning() expects horizontal parameter to be one of ('+horizontalModes.join(', ')+')');} this._options.widgetPositioning.horizontal=_widgetPositioning.horizontal;} if(_widgetPositioning.vertical){if(typeof _widgetPositioning.vertical!=='string'){throw new TypeError('widgetPositioning() vertical variable must be a string');} _widgetPositioning.vertical=_widgetPositioning.vertical.toLowerCase();if(verticalModes.indexOf(_widgetPositioning.vertical)===-1){throw new TypeError('widgetPositioning() expects vertical parameter to be one of ('+verticalModes.join(', ')+')');} this._options.widgetPositioning.vertical=_widgetPositioning.vertical;} this._update();};TempusDominusBootstrap4.prototype.widgetParent=function widgetParent(_widgetParent){if(arguments.length===0){return this._options.widgetParent;} if(typeof _widgetParent==='string'){_widgetParent=$(_widgetParent);} if(_widgetParent!==null&&typeof _widgetParent!=='string'&&!(_widgetParent instanceof $)){throw new TypeError('widgetParent() expects a string or a jQuery object parameter');} this._options.widgetParent=_widgetParent;if(this.widget){this.hide();this.show();}};TempusDominusBootstrap4._jQueryHandleThis=function _jQueryHandleThis(me,option,argument){var data=$(me).data(DateTimePicker.DATA_KEY);if((typeof option==='undefined'?'undefined':_typeof(option))==='object'){$.extend({},DateTimePicker.Default,option);} if(!data){data=new TempusDominusBootstrap4($(me),option);$(me).data(DateTimePicker.DATA_KEY,data);} if(typeof option==='string'){if(data[option]===undefined){throw new Error('No method named "'+option+'"');} if(argument===undefined){return data[option]();}else{return data[option](argument);}}};TempusDominusBootstrap4._jQueryInterface=function _jQueryInterface(option,argument){if(this.length===1){return TempusDominusBootstrap4._jQueryHandleThis(this[0],option,argument);} return this.each(function(){TempusDominusBootstrap4._jQueryHandleThis(this,option,argument);});};return TempusDominusBootstrap4;}(DateTimePicker);$(document).on(DateTimePicker.Event.CLICK_DATA_API,DateTimePicker.Selector.DATA_TOGGLE,function(){var $target=getSelectorFromElement($(this));if($target.length===0){return;} TempusDominusBootstrap4._jQueryInterface.call($target,'toggle');}).on(DateTimePicker.Event.CHANGE,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this));if($target.length===0){return;} TempusDominusBootstrap4._jQueryInterface.call($target,'_change',event);}).on(DateTimePicker.Event.BLUR,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this)),config=$target.data(DateTimePicker.DATA_KEY);if($target.length===0){return;} if(config&&config._options.debug||window.debug){return;} TempusDominusBootstrap4._jQueryInterface.call($target,'hide',event);}).on(DateTimePicker.Event.KEYDOWN,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this));if($target.length===0){return;} TempusDominusBootstrap4._jQueryInterface.call($target,'_keydown',event);}).on(DateTimePicker.Event.KEYUP,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this));if($target.length===0){return;} TempusDominusBootstrap4._jQueryInterface.call($target,'_keyup',event);}).on(DateTimePicker.Event.FOCUS,'.'+DateTimePicker.ClassName.INPUT,function(event){var $target=getSelectorFromElement($(this)),config=$target.data(DateTimePicker.DATA_KEY);if($target.length===0){return;} if(!(config&&config._options.allowInputToggle)){return;} TempusDominusBootstrap4._jQueryInterface.call($target,'show',event);});$.fn[DateTimePicker.NAME]=TempusDominusBootstrap4._jQueryInterface;$.fn[DateTimePicker.NAME].Constructor=TempusDominusBootstrap4;$.fn[DateTimePicker.NAME].noConflict=function(){$.fn[DateTimePicker.NAME]=JQUERY_NO_CONFLICT;return TempusDominusBootstrap4._jQueryInterface;};return TempusDominusBootstrap4;}(jQuery);}();; /* /web/static/lib/select2/select2.js defined in bundle 'web.assets_common_lazy' */ (function($){if(typeof $.fn.each2=="undefined"){$.extend($.fn,{each2:function(c){var j=$([0]),i=-1,l=this.length;while(++i=112&&k<=123;}},MEASURE_SCROLLBAR_TEMPLATE="
",DIACRITICS={"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038A":"\u0399","\u03AA":"\u0399","\u038C":"\u039F","\u038E":"\u03A5","\u03AB":"\u03A5","\u038F":"\u03A9","\u03AC":"\u03B1","\u03AD":"\u03B5","\u03AE":"\u03B7","\u03AF":"\u03B9","\u03CA":"\u03B9","\u0390":"\u03B9","\u03CC":"\u03BF","\u03CD":"\u03C5","\u03CB":"\u03C5","\u03B0":"\u03C5","\u03C9":"\u03C9","\u03C2":"\u03C3"};$document=$(document);nextUid=(function(){var counter=1;return function(){return counter++;};}());function reinsertElement(element){var placeholder=$(document.createTextNode(''));element.before(placeholder);placeholder.before(element);placeholder.remove();} function stripDiacritics(str){function match(a){return DIACRITICS[a]||a;} return str.replace(/[^\u0000-\u007E]/g,match);} function indexOf(value,array){var i=0,l=array.length;for(;i=0)notify(e);});} function focus($el){if($el[0]===document.activeElement)return;window.setTimeout(function(){var el=$el[0],pos=$el.val().length,range;$el.focus();var isVisible=(el.offsetWidth>0||el.offsetHeight>0);if(isVisible&&el===document.activeElement){if(el.setSelectionRange) {el.setSelectionRange(pos,pos);} else if(el.createTextRange){range=el.createTextRange();range.collapse(false);range.select();}}},0);} function getCursorInfo(el){el=$(el)[0];var offset=0;var length=0;if('selectionStart'in el){offset=el.selectionStart;length=el.selectionEnd-offset;}else if('selection'in document){el.focus();var sel=document.selection.createRange();length=document.selection.createRange().text.length;sel.moveStart('character',-el.value.length);offset=sel.text.length-length;} return{offset:offset,length:length};} function killEvent(event){event.preventDefault();event.stopPropagation();} function killEventImmediately(event){event.preventDefault();event.stopImmediatePropagation();} function measureTextWidth(e){if(!sizer){var style=e[0].currentStyle||window.getComputedStyle(e[0],null);sizer=$(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:style.fontSize,fontFamily:style.fontFamily,fontStyle:style.fontStyle,fontWeight:style.fontWeight,letterSpacing:style.letterSpacing,textTransform:style.textTransform,whiteSpace:"nowrap"});sizer.attr("class","select2-sizer");$(document.body).append(sizer);} sizer.text(e.val());return sizer.width();} function syncCssClasses(dest,src,adapter){var classes,replacements=[],adapted;classes=$.trim(dest.attr("class"));if(classes){classes=''+classes;$(classes.split(/\s+/)).each2(function(){if(this.indexOf("select2-")===0){replacements.push(this);}});} classes=$.trim(src.attr("class"));if(classes){classes=''+classes;$(classes.split(/\s+/)).each2(function(){if(this.indexOf("select2-")!==0){adapted=adapter(this);if(adapted){replacements.push(adapted);}}});} dest.attr("class",replacements.join(" "));} function markMatch(text,term,markup,escapeMarkup){var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),tl=term.length;if(match<0){markup.push(escapeMarkup(text));return;} markup.push(escapeMarkup(text.substring(0,match)));markup.push("");markup.push(escapeMarkup(text.substring(match,match+tl)));markup.push("");markup.push(escapeMarkup(text.substring(match+tl,text.length)));} function defaultEscapeMarkup(markup){var replace_map={'\\':'\','&':'&','<':'<','>':'>','"':'"',"'":''',"/":'/'};return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replace_map[match];});} function ajax(options){var timeout,handler=null,quietMillis=options.quietMillis||100,ajaxUrl=options.url,self=this;return function(query){window.clearTimeout(timeout);timeout=window.setTimeout(function(){var data=options.data,url=ajaxUrl,transport=options.transport||$.fn.select2.ajaxDefaults.transport,deprecated={type:options.type||'GET',cache:options.cache||false,jsonpCallback:options.jsonpCallback||undefined,dataType:options.dataType||"json"},params=$.extend({},$.fn.select2.ajaxDefaults.params,deprecated);data=data?data.call(self,query.term,query.page,query.context):null;url=(typeof url==='function')?url.call(self,query.term,query.page,query.context):url;if(handler&&typeof handler.abort==="function"){handler.abort();} if(options.params){if($.isFunction(options.params)){$.extend(params,options.params.call(self));}else{$.extend(params,options.params);}} $.extend(params,{url:url,dataType:options.dataType,data:data,success:function(data){var results=options.results(data,query.page,query);query.callback(results);},error:function(jqXHR,textStatus,errorThrown){var results={hasError:true,jqXHR:jqXHR,textStatus:textStatus,errorThrown:errorThrown};query.callback(results);}});handler=transport.call(self,params);},quietMillis);};} function local(options){var data=options,dataText,tmp,text=function(item){return""+item.text;};if($.isArray(data)){tmp=data;data={results:tmp};} if($.isFunction(data)===false){tmp=data;data=function(){return tmp;};} var dataItem=data();if(dataItem.text){text=dataItem.text;if(!$.isFunction(text)){dataText=dataItem.text;text=function(item){return item[dataText];};}} return function(query){var t=query.term,filtered={results:[]},process;if(t===""){query.callback(data());return;} process=function(datum,collection){var group,attr;datum=datum[0];if(datum.children){group={};for(attr in datum){if(datum.hasOwnProperty(attr))group[attr]=datum[attr];} group.children=[];$(datum.children).each2(function(i,childDatum){process(childDatum,group.children);});if(group.children.length||query.matcher(t,text(group),datum)){collection.push(group);}}else{if(query.matcher(t,text(datum),datum)){collection.push(datum);}}};$(data().results).each2(function(i,datum){process(datum,filtered.results);});query.callback(filtered);};} function tags(data){var isFunc=$.isFunction(data);return function(query){var t=query.term,filtered={results:[]};var result=isFunc?data(query):data;if($.isArray(result)){$(result).each(function(){var isObject=this.text!==undefined,text=isObject?this.text:this;if(t===""||query.matcher(t,text)){filtered.results.push(isObject?this:{id:this,text:this});}});query.callback(filtered);}};} function checkFormatter(formatter,formatterName){if($.isFunction(formatter))return true;if(!formatter)return false;if(typeof(formatter)==='string')return true;throw new Error(formatterName+" must be a string, function, or falsy value");} function evaluate(val,context){if($.isFunction(val)){var args=Array.prototype.slice.call(arguments,2);return val.apply(context,args);} return val;} function countResults(results){var count=0;$.each(results,function(i,item){if(item.children){count+=countResults(item.children);}else{count++;}});return count;} function defaultTokenizer(input,selection,selectCallback,opts){var original=input,dupe=false,token,index,i,l,separator;if(!opts.createSearchChoice||!opts.tokenSeparators||opts.tokenSeparators.length<1)return undefined;while(true){index=-1;for(i=0,l=opts.tokenSeparators.length;i=0)break;} if(index<0)break;token=input.substring(0,index);input=input.substring(index+separator.length);if(token.length>0){token=opts.createSearchChoice.call(this,token,selection);if(token!==undefined&&token!==null&&opts.id(token)!==undefined&&opts.id(token)!==null){dupe=false;for(i=0,l=selection.length;i",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body);} this.containerId="s2id_"+(opts.element.attr("id")||"autogen"+nextUid());this.containerEventName=this.containerId.replace(/([.])/g,'_').replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,'\\$1');this.container.attr("id",this.containerId);this.container.attr("title",opts.element.attr("title"));this.body=$(document.body);syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.attr("style",opts.element.attr("style"));this.container.css(evaluate(opts.containerCss,this.opts.element));this.container.addClass(evaluate(opts.containerCssClass,this.opts.element));this.elementTabIndex=this.opts.element.attr("tabindex");this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",killEvent);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(evaluate(opts.dropdownCssClass,this.opts.element));this.dropdown.data("select2",this);this.dropdown.on("click",killEvent);this.results=results=this.container.find(resultsSelector);this.search=search=this.container.find("input.select2-input");this.queryCount=0;this.resultsPage=0;this.context=null;this.initContainer();this.container.on("click",killEvent);installFilteredMouseMove(this.results);this.dropdown.on("mousemove-filtered",resultsSelector,this.bind(this.highlightUnderEvent));this.dropdown.on("touchstart touchmove touchend",resultsSelector,this.bind(function(event){this._touchEvent=true;this.highlightUnderEvent(event);}));this.dropdown.on("touchmove",resultsSelector,this.bind(this.touchMoved));this.dropdown.on("touchstart touchend",resultsSelector,this.bind(this.clearTouchMoved));this.dropdown.on('click',this.bind(function(event){if(this._touchEvent){this._touchEvent=false;this.selectHighlighted();}}));installDebouncedScroll(80,this.results);this.dropdown.on("scroll-debounced",resultsSelector,this.bind(this.loadMoreIfNeeded));$(this.container).on("change",".select2-input",function(e){e.stopPropagation();});$(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation();});if($.fn.mousewheel){results.mousewheel(function(e,delta,deltaX,deltaY){var top=results.scrollTop();if(deltaY>0&&top-deltaY<=0){results.scrollTop(0);killEvent(e);}else if(deltaY<0&&results.get(0).scrollHeight-results.scrollTop()+deltaY<=results.height()){results.scrollTop(results.get(0).scrollHeight-results.height());killEvent(e);}});} installKeyUpChangeEvent(search);search.on("keyup-change input paste",this.bind(this.updateResults));search.on("focus",function(){search.addClass("select2-focused");});search.on("blur",function(){search.removeClass("select2-focused");});this.dropdown.on("mouseup",resultsSelector,this.bind(function(e){if($(e.target).closest(".select2-result-selectable").length>0){this.highlightUnderEvent(e);this.selectHighlighted(e);}}));this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation();});this.lastSearchTerm=undefined;if($.isFunction(this.opts.initSelection)){this.initSelection();this.monitorSource();} if(opts.maximumInputLength!==null){this.search.attr("maxlength",opts.maximumInputLength);} var disabled=opts.element.prop("disabled");if(disabled===undefined)disabled=false;this.enable(!disabled);var readonly=opts.element.prop("readonly");if(readonly===undefined)readonly=false;this.readonly(readonly);scrollBarDimensions=scrollBarDimensions||measureScrollbar();this.autofocus=opts.element.prop("autofocus");opts.element.prop("autofocus",false);if(this.autofocus)this.focus();this.search.attr("placeholder",opts.searchInputPlaceholder);},destroy:function(){var element=this.opts.element,select2=element.data("select2"),self=this;this.close();if(element.length&&element[0].detachEvent&&self._sync){element.each(function(){if(self._sync){this.detachEvent("onpropertychange",self._sync);}});} if(this.propertyObserver){this.propertyObserver.disconnect();this.propertyObserver=null;} this._sync=null;if(select2!==undefined){select2.container.remove();select2.liveRegion.remove();select2.dropdown.remove();element.removeData("select2").off(".select2");if(!element.is("input[type='hidden']")){element.show().prop("autofocus",this.autofocus||false);if(this.elementTabIndex){element.attr({tabindex:this.elementTabIndex});}else{element.removeAttr("tabindex");} element.show();}else{element.css("display","");}} cleanupJQueryElements.call(this,"container","liveRegion","dropdown","results","search");},optionToData:function(element){if(element.is("option")){return{id:element.prop("value"),text:element.text(),element:element.get(),css:element.attr("class"),disabled:element.prop("disabled"),locked:equal(element.attr("locked"),"locked")||equal(element.data("locked"),true)};}else if(element.is("optgroup")){return{text:element.attr("label"),children:[],element:element.get(),css:element.attr("class")};}},prepareOpts:function(opts){var element,select,idKey,ajaxUrl,self=this;element=opts.element;if(element.get(0).tagName.toLowerCase()==="select"){this.select=select=opts.element;} if(select){$.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in opts){throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a ","
"," ","
    ","
","
"].join(""));return container;},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.focusser.prop("disabled",!this.isInterfaceEnabled());}},opening:function(){var el,range,len;if(this.opts.minimumResultsForSearch>=0){this.showSearch(true);} this.parent.opening.apply(this,arguments);if(this.showSearchInput!==false){this.search.val(this.focusser.val());} if(this.opts.shouldFocusInput(this)){this.search.focus();el=this.search.get(0);if(el.createTextRange){range=el.createTextRange();range.collapse(false);range.select();}else if(el.setSelectionRange){len=this.search.val().length;el.setSelectionRange(len,len);}} this.prefillNextSearchTerm();this.focusser.prop("disabled",true).val("");this.updateResults(true);this.opts.element.trigger($.Event("select2-open"));},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments);this.focusser.prop("disabled",false);if(this.opts.shouldFocusInput(this)){this.focusser.focus();}},focus:function(){if(this.opened()){this.close();}else{this.focusser.prop("disabled",false);if(this.opts.shouldFocusInput(this)){this.focusser.focus();}}},isFocused:function(){return this.container.hasClass("select2-container-active");},cancel:function(){this.parent.cancel.apply(this,arguments);this.focusser.prop("disabled",false);if(this.opts.shouldFocusInput(this)){this.focusser.focus();}},destroy:function(){$("label[for='"+this.focusser.attr('id')+"']").attr('for',this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments);cleanupJQueryElements.call(this,"selection","focusser");},initContainer:function(){var selection,container=this.container,dropdown=this.dropdown,idSuffix=nextUid(),elementLabel;if(this.opts.minimumResultsForSearch<0){this.showSearch(false);}else{this.showSearch(true);} this.selection=selection=container.find(".select2-choice");this.focusser=container.find(".select2-focusser");selection.find(".select2-chosen").attr("id","select2-chosen-"+idSuffix);this.focusser.attr("aria-labelledby","select2-chosen-"+idSuffix);this.results.attr("id","select2-results-"+idSuffix);this.search.attr("aria-owns","select2-results-"+idSuffix);this.focusser.attr("id","s2id_autogen"+idSuffix);elementLabel=$("label[for='"+this.opts.element.attr("id")+"']");this.opts.element.on('focus.select2',this.bind(function(){this.focus();}));this.focusser.prev().text(elementLabel.text()).attr('for',this.focusser.attr('id'));var originalTitle=this.opts.element.attr("title");this.opts.element.attr("title",(originalTitle||elementLabel.text()));this.focusser.attr("tabindex",this.elementTabIndex);this.search.attr("id",this.focusser.attr('id')+'_search');this.search.prev().text($("label[for='"+this.focusser.attr('id')+"']").text()).attr('for',this.search.attr('id'));this.search.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;if(229==e.keyCode)return;if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN){killEvent(e);return;} switch(e.which){case KEY.UP:case KEY.DOWN:this.moveHighlight((e.which===KEY.UP)?-1:1);killEvent(e);return;case KEY.ENTER:this.selectHighlighted();killEvent(e);return;case KEY.TAB:this.selectHighlighted({noFocus:true});return;case KEY.ESC:this.cancel(e);killEvent(e);return;}}));this.search.on("blur",this.bind(function(e){if(document.activeElement===this.body.get(0)){window.setTimeout(this.bind(function(){if(this.opened()&&this.results&&this.results.length>1){this.search.focus();}}),0);}}));this.focusser.on("keydown",this.bind(function(e){if(!this.isInterfaceEnabled())return;if(e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.ESC){return;} if(this.opts.openOnEnter===false&&e.which===KEY.ENTER){killEvent(e);return;} if(e.which==KEY.DOWN||e.which==KEY.UP||(e.which==KEY.ENTER&&this.opts.openOnEnter)){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;this.open();killEvent(e);return;} if(e.which==KEY.DELETE||e.which==KEY.BACKSPACE){if(this.opts.allowClear){this.clear();} killEvent(e);return;}}));installKeyUpChangeEvent(this.focusser);this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){e.stopPropagation();if(this.opened())return;this.open();}}));selection.on("mousedown touchstart","abbr",this.bind(function(e){if(!this.isInterfaceEnabled()){return;} this.clear();killEventImmediately(e);this.close();if(this.selection){this.selection.focus();}}));selection.on("mousedown touchstart",this.bind(function(e){reinsertElement(selection);if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));} if(this.opened()){this.close();}else if(this.isInterfaceEnabled()){this.open();} killEvent(e);}));dropdown.on("mousedown touchstart",this.bind(function(){if(this.opts.shouldFocusInput(this)){this.search.focus();}}));selection.on("focus",this.bind(function(e){killEvent(e);}));this.focusser.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));} this.container.addClass("select2-container-active");})).on("blur",this.bind(function(){if(!this.opened()){this.container.removeClass("select2-container-active");this.opts.element.trigger($.Event("select2-blur"));}}));this.search.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));} this.container.addClass("select2-container-active");}));this.initContainerWidth();this.opts.element.hide();this.setPlaceholder();},clear:function(triggerChange){var data=this.selection.data("select2-data");if(data){var evt=$.Event("select2-clearing");this.opts.element.trigger(evt);if(evt.isDefaultPrevented()){return;} var placeholderOption=this.getPlaceholderOption();this.opts.element.val(placeholderOption?placeholderOption.val():"");this.selection.find(".select2-chosen").empty();this.selection.removeData("select2-data");this.setPlaceholder();if(triggerChange!==false){this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data});this.triggerChange({removed:data});}}},initSelection:function(){var selected;if(this.isPlaceholderOptionSelected()){this.updateSelection(null);this.close();this.setPlaceholder();}else{var self=this;this.opts.initSelection.call(null,this.opts.element,function(selected){if(selected!==undefined&&selected!==null){self.updateSelection(selected);self.close();self.setPlaceholder();self.lastSearchTerm=self.search.val();}});}},isPlaceholderOptionSelected:function(){var placeholderOption;if(this.getPlaceholder()===undefined)return false;return((placeholderOption=this.getPlaceholderOption())!==undefined&&placeholderOption.prop("selected"))||(this.opts.element.val()==="")||(this.opts.element.val()===undefined)||(this.opts.element.val()===null);},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;if(opts.element.get(0).tagName.toLowerCase()==="select"){opts.initSelection=function(element,callback){var selected=element.find("option").filter(function(){return this.selected&&!this.disabled});callback(self.optionToData(selected));};}else if("data"in opts){opts.initSelection=opts.initSelection||function(element,callback){var id=element.val();var match=null;opts.query({matcher:function(term,text,el){var is_match=equal(id,opts.id(el));if(is_match){match=el;} return is_match;},callback:!$.isFunction(callback)?$.noop:function(){callback(match);}});};} return opts;},getPlaceholder:function(){if(this.select){if(this.getPlaceholderOption()===undefined){return undefined;}} return this.parent.getPlaceholder.apply(this,arguments);},setPlaceholder:function(){var placeholder=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&placeholder!==undefined){if(this.select&&this.getPlaceholderOption()===undefined)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(placeholder));this.selection.addClass("select2-default");this.container.removeClass("select2-allowclear");}},postprocessResults:function(data,initial,noHighlightUpdate){var selected=0,self=this,showSearchInput=true;this.findHighlightableChoices().each2(function(i,elm){if(equal(self.id(elm.data("select2-data")),self.opts.element.val())){selected=i;return false;}});if(noHighlightUpdate!==false){if(initial===true&&selected>=0){this.highlight(selected);}else{this.highlight(0);}} if(initial===true){var min=this.opts.minimumResultsForSearch;if(min>=0){this.showSearch(countResults(data.results)>=min);}}},showSearch:function(showSearchInput){if(this.showSearchInput===showSearchInput)return;this.showSearchInput=showSearchInput;this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!showSearchInput);this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!showSearchInput);$(this.dropdown,this.container).toggleClass("select2-with-searchbox",showSearchInput);},onSelect:function(data,options){if(!this.triggerSelect(data)){return;} var old=this.opts.element.val(),oldData=this.data();this.opts.element.val(this.id(data));this.updateSelection(data);this.opts.element.trigger({type:"select2-selected",val:this.id(data),choice:data});this.lastSearchTerm=this.search.val();this.close();if((!options||!options.noFocus)&&this.opts.shouldFocusInput(this)){this.focusser.focus();} if(!equal(old,this.id(data))){this.triggerChange({added:data,removed:oldData});}},updateSelection:function(data){var container=this.selection.find(".select2-chosen"),formatted,cssClass;this.selection.data("select2-data",data);container.empty();if(data!==null){formatted=this.opts.formatSelection(data,container,this.opts.escapeMarkup);} if(formatted!==undefined){container.append(formatted);} cssClass=this.opts.formatSelectionCssClass(data,container);if(cssClass!==undefined){container.addClass(cssClass);} this.selection.removeClass("select2-default");if(this.opts.allowClear&&this.getPlaceholder()!==undefined){this.container.addClass("select2-allowclear");}},val:function(){var val,triggerChange=false,data=null,self=this,oldData=this.data();if(arguments.length===0){return this.opts.element.val();} val=arguments[0];if(arguments.length>1){triggerChange=arguments[1];if(this.opts.debug&&console&&console.warn){console.warn('Select2: The second option to `select2("val")` is not supported in Select2 4.0.0. '+'The `change` event will always be triggered in 4.0.0.');}} if(this.select){if(this.opts.debug&&console&&console.warn){console.warn('Select2: Setting the value on a "," ","","
","
    ","
","
"].join(""));return container;},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;if(opts.element.get(0).tagName.toLowerCase()==="select"){opts.initSelection=function(element,callback){var data=[];element.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(i,elm){data.push(self.optionToData(elm));});callback(data);};}else if("data"in opts){opts.initSelection=opts.initSelection||function(element,callback){var ids=splitVal(element.val(),opts.separator,opts.transformVal);var matches=[];opts.query({matcher:function(term,text,el){var is_match=$.grep(ids,function(id){return equal(id,opts.id(el));}).length;if(is_match){matches.push(el);} return is_match;},callback:!$.isFunction(callback)?$.noop:function(){var ordered=[];for(var i=0;i0){return;} this.selectChoice(null);this.clearPlaceholder();if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));} this.open();this.focusSearch();e.preventDefault();}));this.container.on("focus",selector,this.bind(function(){if(!this.isInterfaceEnabled())return;if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger($.Event("select2-focus"));} this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");this.clearPlaceholder();}));this.initContainerWidth();this.opts.element.hide();this.clearSearch();},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.search.prop("disabled",!this.isInterfaceEnabled());}},initSelection:function(){var data;if(this.opts.element.val()===""&&this.opts.element.text()===""){this.updateSelection([]);this.close();this.clearSearch();} if(this.select||this.opts.element.val()!==""){var self=this;this.opts.initSelection.call(null,this.opts.element,function(data){if(data!==undefined&&data!==null){self.updateSelection(data);self.close();self.clearSearch();}});}},clearSearch:function(){var placeholder=this.getPlaceholder(),maxWidth=this.getMaxSearchWidth();if(placeholder!==undefined&&this.getVal().length===0&&this.search.hasClass("select2-focused")===false){this.search.val(placeholder).addClass("select2-default");this.search.width(maxWidth>0?maxWidth:this.container.css("width"));}else{this.search.val("").width(10);}},clearPlaceholder:function(){if(this.search.hasClass("select2-default")){this.search.val("").removeClass("select2-default");}},opening:function(){this.clearPlaceholder();this.resizeSearch();this.parent.opening.apply(this,arguments);this.focusSearch();this.prefillNextSearchTerm();this.updateResults(true);if(this.opts.shouldFocusInput(this)){this.search.focus();} this.opts.element.trigger($.Event("select2-open"));},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments);},focus:function(){this.close();this.search.focus();},isFocused:function(){return this.search.hasClass("select2-focused");},updateSelection:function(data){var ids={},filtered=[],self=this;$(data).each(function(){if(!(self.id(this)in ids)){ids[self.id(this)]=0;filtered.push(this);}});this.selection.find(".select2-search-choice").remove();this.addSelectedChoice(filtered);self.postprocessResults();},tokenize:function(){var input=this.search.val();input=this.opts.tokenizer.call(this,input,this.data(),this.bind(this.onSelect),this.opts);if(input!=null&&input!=undefined){this.search.val(input);if(input.length>0){this.open();}}},onSelect:function(data,options){if(!this.triggerSelect(data)||data.text===""){return;} this.addSelectedChoice(data);this.opts.element.trigger({type:"selected",val:this.id(data),choice:data});this.lastSearchTerm=this.search.val();this.clearSearch();this.updateResults();if(this.select||!this.opts.closeOnSelect)this.postprocessResults(data,false,this.opts.closeOnSelect===true);if(this.opts.closeOnSelect){this.close();this.search.width(10);}else{if(this.countSelectableResults()>0){this.search.width(10);this.resizeSearch();if(this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()){this.updateResults(true);}else{if(this.prefillNextSearchTerm()){this.updateResults();}} this.positionDropdown();}else{this.close();this.search.width(10);}} this.triggerChange({added:data});if(!options||!options.noFocus) this.focusSearch();},cancel:function(){this.close();this.focusSearch();},addSelectedChoice:function(data){var val=this.getVal(),self=this;$(data).each(function(){val.push(self.createChoice(this));});this.setVal(val);},createChoice:function(data){var enableChoice=!data.locked,enabledItem=$("
  • "+"
    "+" "+"
  • "),disabledItem=$("
  • "+"
    "+"
  • ");var choice=enableChoice?enabledItem:disabledItem,id=this.id(data),formatted,cssClass;formatted=this.opts.formatSelection(data,choice.find("div"),this.opts.escapeMarkup);if(formatted!=undefined){choice.find("div").replaceWith($("
    ").html(formatted));} cssClass=this.opts.formatSelectionCssClass(data,choice.find("div"));if(cssClass!=undefined){choice.addClass(cssClass);} if(enableChoice){choice.find(".select2-search-choice-close").on("mousedown",killEvent).on("click dblclick",this.bind(function(e){if(!this.isInterfaceEnabled())return;this.unselect($(e.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");killEvent(e);this.close();this.focusSearch();})).on("focus",this.bind(function(){if(!this.isInterfaceEnabled())return;this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");}));} choice.data("select2-data",data);choice.insertBefore(this.searchContainer);return id;},unselect:function(selected){var val=this.getVal(),data,index;selected=selected.closest(".select2-search-choice");if(selected.length===0){throw"Invalid argument: "+selected+". Must be .select2-search-choice";} data=selected.data("select2-data");if(!data){return;} var evt=$.Event("select2-removing");evt.val=this.id(data);evt.choice=data;this.opts.element.trigger(evt);if(evt.isDefaultPrevented()){return false;} while((index=indexOf(this.id(data),val))>=0){val.splice(index,1);this.setVal(val);if(this.select)this.postprocessResults();} selected.remove();this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data});this.triggerChange({removed:data});return true;},postprocessResults:function(data,initial,noHighlightUpdate){var val=this.getVal(),choices=this.results.find(".select2-result"),compound=this.results.find(".select2-result-with-children"),self=this;choices.each2(function(i,choice){var id=self.id(choice.data("select2-data"));if(indexOf(id,val)>=0){choice.addClass("select2-selected");choice.find(".select2-result-selectable").addClass("select2-selected");}});compound.each2(function(i,choice){if(!choice.is('.select2-result-selectable')&&choice.find(".select2-result-selectable:not(.select2-selected)").length===0){choice.addClass("select2-selected");}});if(this.highlight()==-1&&noHighlightUpdate!==false&&this.opts.closeOnSelect===true){self.highlight(0);} if(!this.opts.createSearchChoice&&!choices.filter('.select2-result:not(.select2-selected)').length>0){if(!data||data&&!data.more&&this.results.find(".select2-no-results").length===0){if(checkFormatter(self.opts.formatNoMatches,"formatNoMatches")){this.results.append("
  • "+evaluate(self.opts.formatNoMatches,self.opts.element,self.search.val())+"
  • ");}}}},getMaxSearchWidth:function(){return this.selection.width()-getSideBorderPadding(this.search);},resizeSearch:function(){var minimumWidth,left,maxWidth,containerLeft,searchWidth,sideBorderPadding=getSideBorderPadding(this.search);minimumWidth=measureTextWidth(this.search)+10;left=this.search.offset().left;maxWidth=this.selection.width();containerLeft=this.selection.offset().left;searchWidth=maxWidth-(left-containerLeft)-sideBorderPadding;if(searchWidth. Attach to instead.");} this.search.width(0);this.searchContainer.hide();},onSortEnd:function(){var val=[],self=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){val.push(self.opts.id($(this).data("select2-data")));});this.setVal(val);this.triggerChange();},data:function(values,triggerChange){var self=this,ids,old;if(arguments.length===0){return this.selection.children(".select2-search-choice").map(function(){return $(this).data("select2-data");}).get();}else{old=this.data();if(!values){values=[];} ids=$.map(values,function(e){return self.opts.id(e);});this.setVal(ids);this.updateSelection(values);this.clearSearch();if(triggerChange){this.triggerChange(this.buildChangeDetails(old,this.data()));}}}});$.fn.select2=function(){var args=Array.prototype.slice.call(arguments,0),opts,select2,method,value,multiple,allowedMethods=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],valueMethods=["opened","isFocused","container","dropdown"],propertyMethods=["val","data"],methodsMap={search:"externalSearch"};this.each(function(){if(args.length===0||typeof(args[0])==="object"){opts=args.length===0?{}:$.extend({},args[0]);opts.element=$(this);if(opts.element.get(0).tagName.toLowerCase()==="select"){multiple=opts.element.prop("multiple");}else{multiple=opts.multiple||false;if("tags"in opts){opts.multiple=multiple=true;}} select2=multiple?new window.Select2["class"].multi():new window.Select2["class"].single();select2.init(opts);}else if(typeof(args[0])==="string"){if(indexOf(args[0],allowedMethods)<0){throw"Unknown method: "+args[0];} value=undefined;select2=$(this).data("select2");if(select2===undefined)return;method=args[0];if(method==="container"){value=select2.container;}else if(method==="dropdown"){value=select2.dropdown;}else{if(methodsMap[method])method=methodsMap[method];value=select2[method].apply(select2,args.slice(1));} if(indexOf(args[0],valueMethods)>=0||(indexOf(args[0],propertyMethods)>=0&&args.length==1)){return false;}}else{throw"Invalid arguments to select2 plugin: "+args;}});return(value===undefined)?this:value;};$.fn.select2.defaults={debug:false,width:"copy",loadMorePadding:0,closeOnSelect:true,openOnEnter:true,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(result,container,query,escapeMarkup){var markup=[];markMatch(this.text(result),query.term,markup,escapeMarkup);return markup.join("");},transformVal:function(val){return $.trim(val);},formatSelection:function(data,container,escapeMarkup){return data?escapeMarkup(this.text(data)):undefined;},sortResults:function(results,container,query){return results;},formatResultCssClass:function(data){return data.css;},formatSelectionCssClass:function(data,container){return undefined;},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==undefined?null:e.id;},text:function(e){if(e&&this.data&&this.data.text){if($.isFunction(this.data.text)){return this.data.text(e);}else{return e[this.data.text];}}else{return e.text;}},matcher:function(term,text){return stripDiacritics(''+text).toUpperCase().indexOf(stripDiacritics(''+term).toUpperCase())>=0;},separator:",",tokenSeparators:[],tokenizer:defaultTokenizer,escapeMarkup:defaultEscapeMarkup,blurOnChange:false,selectOnBlur:false,adaptContainerCssClass:function(c){return c;},adaptDropdownCssClass:function(c){return null;},nextSearchTerm:function(selectedObject,currentSearchTerm){return undefined;},searchInputPlaceholder:'',createSearchChoicePosition:'top',shouldFocusInput:function(instance){var supportsTouchEvents=(('ontouchstart'in window)||(navigator.msMaxTouchPoints>0));if(!supportsTouchEvents){return true;} if(instance.opts.minimumResultsForSearch<0){return false;} return true;}};$.fn.select2.locales=[];$.fn.select2.locales['en']={formatMatches:function(matches){if(matches===1){return"One result is available, press enter to select it.";}return matches+" results are available, use up and down arrow keys to navigate.";},formatNoMatches:function(){return"No matches found";},formatAjaxError:function(jqXHR,textStatus,errorThrown){return"Loading failed";},formatInputTooShort:function(input,min){var n=min-input.length;return"Please enter "+n+" or more character"+(n==1?"":"s");},formatInputTooLong:function(input,max){var n=input.length-max;return"Please delete "+n+" character"+(n==1?"":"s");},formatSelectionTooBig:function(limit){return"You can only select "+limit+" item"+(limit==1?"":"s");},formatLoadMore:function(pageNumber){return"Loading more results…";},formatSearching:function(){return"Searching…";}};$.extend($.fn.select2.defaults,$.fn.select2.locales['en']);$.fn.select2.ajaxDefaults={transport:$.ajax,params:{type:"GET",cache:false,dataType:"json"}};window.Select2={query:{ajax:ajax,local:local,tags:tags},util:{debounce:debounce,markMatch:markMatch,escapeMarkup:defaultEscapeMarkup,stripDiacritics:stripDiacritics},"class":{"abstract":AbstractSelect2,"single":SingleSelect2,"multi":MultiSelect2}};}(jQuery));; /* /web/static/lib/clipboard/clipboard.js defined in bundle 'web.assets_common_lazy' */ (function webpackUniversalModuleDefinition(root,factory){if(typeof exports==='object'&&typeof module==='object') module.exports=factory();else if(typeof define==='function'&&define.amd) define([],factory);else if(typeof exports==='object') exports["ClipboardJS"]=factory();else root["ClipboardJS"]=factory();})(this,function(){return(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports;} var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.l=true;return module.exports;} __webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.i=function(value){return value;};__webpack_require__.d=function(exports,name,getter){if(!__webpack_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter});}};__webpack_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module['default'];}:function getModuleExports(){return module;};__webpack_require__.d(getter,'a',getter);return getter;};__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property);};__webpack_require__.p="";return __webpack_require__(__webpack_require__.s=3);}) ([(function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(global,factory){if(true){!(__WEBPACK_AMD_DEFINE_ARRAY__=[module,__webpack_require__(7)],__WEBPACK_AMD_DEFINE_FACTORY__=(factory),__WEBPACK_AMD_DEFINE_RESULT__=(typeof __WEBPACK_AMD_DEFINE_FACTORY__==='function'?(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__)):__WEBPACK_AMD_DEFINE_FACTORY__),__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__));}else if(typeof exports!=="undefined"){factory(module,require('select'));}else{var mod={exports:{}};factory(mod,global.select);global.clipboardAction=mod.exports;}})(this,function(module,_select){'use strict';var _select2=_interopRequireDefault(_select);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}} var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:{};this.action=options.action;this.container=options.container;this.emitter=options.emitter;this.target=options.target;this.text=options.text;this.trigger=options.trigger;this.selectedText='';}},{key:'initSelection',value:function initSelection(){if(this.text){this.selectFake();}else if(this.target){this.selectTarget();}}},{key:'selectFake',value:function selectFake(){var _this=this;var isRTL=document.documentElement.getAttribute('dir')=='rtl';this.removeFake();this.fakeHandlerCallback=function(){return _this.removeFake();};this.fakeHandler=this.container.addEventListener('click',this.fakeHandlerCallback)||true;this.fakeElem=document.createElement('textarea');this.fakeElem.style.fontSize='12pt';this.fakeElem.style.border='0';this.fakeElem.style.padding='0';this.fakeElem.style.margin='0';this.fakeElem.style.position='absolute';this.fakeElem.style[isRTL?'right':'left']='-9999px';var yPosition=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=yPosition+'px';this.fakeElem.setAttribute('readonly','');this.fakeElem.value=this.text;this.container.appendChild(this.fakeElem);this.selectedText=(0,_select2.default)(this.fakeElem);this.copyText();}},{key:'removeFake',value:function removeFake(){if(this.fakeHandler){this.container.removeEventListener('click',this.fakeHandlerCallback);this.fakeHandler=null;this.fakeHandlerCallback=null;} if(this.fakeElem){this.container.removeChild(this.fakeElem);this.fakeElem=null;}}},{key:'selectTarget',value:function selectTarget(){this.selectedText=(0,_select2.default)(this.target);this.copyText();}},{key:'copyText',value:function copyText(){var succeeded=void 0;try{succeeded=document.execCommand(this.action);}catch(err){succeeded=false;} this.handleResult(succeeded);}},{key:'handleResult',value:function handleResult(succeeded){this.emitter.emit(succeeded?'success':'error',{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)});}},{key:'clearSelection',value:function clearSelection(){if(this.trigger){this.trigger.focus();} window.getSelection().removeAllRanges();}},{key:'destroy',value:function destroy(){this.removeFake();}},{key:'action',set:function set(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'copy';this._action=action;if(this._action!=='copy'&&this._action!=='cut'){throw new Error('Invalid "action" value, use either "copy" or "cut"');}},get:function get(){return this._action;}},{key:'target',set:function set(target){if(target!==undefined){if(target&&(typeof target==='undefined'?'undefined':_typeof(target))==='object'&&target.nodeType===1){if(this.action==='copy'&&target.hasAttribute('disabled')){throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');} if(this.action==='cut'&&(target.hasAttribute('readonly')||target.hasAttribute('disabled'))){throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');} this._target=target;}else{throw new Error('Invalid "target" value, use a valid Element');}}},get:function get(){return this._target;}}]);return ClipboardAction;}();module.exports=ClipboardAction;});}),(function(module,exports,__webpack_require__){var is=__webpack_require__(6);var delegate=__webpack_require__(5);function listen(target,type,callback){if(!target&&!type&&!callback){throw new Error('Missing required arguments');} if(!is.string(type)){throw new TypeError('Second argument must be a String');} if(!is.fn(callback)){throw new TypeError('Third argument must be a Function');} if(is.node(target)){return listenNode(target,type,callback);} else if(is.nodeList(target)){return listenNodeList(target,type,callback);} else if(is.string(target)){return listenSelector(target,type,callback);} else{throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');}} function listenNode(node,type,callback){node.addEventListener(type,callback);return{destroy:function(){node.removeEventListener(type,callback);}}} function listenNodeList(nodeList,type,callback){Array.prototype.forEach.call(nodeList,function(node){node.addEventListener(type,callback);});return{destroy:function(){Array.prototype.forEach.call(nodeList,function(node){node.removeEventListener(type,callback);});}}} function listenSelector(selector,type,callback){return delegate(document.body,selector,type,callback);} module.exports=listen;}),(function(module,exports){function E(){} E.prototype={on:function(name,callback,ctx){var e=this.e||(this.e={});(e[name]||(e[name]=[])).push({fn:callback,ctx:ctx});return this;},once:function(name,callback,ctx){var self=this;function listener(){self.off(name,listener);callback.apply(ctx,arguments);};listener._=callback return this.on(name,listener,ctx);},emit:function(name){var data=[].slice.call(arguments,1);var evtArr=((this.e||(this.e={}))[name]||[]).slice();var i=0;var len=evtArr.length;for(i;i0&&arguments[0]!==undefined?arguments[0]:{};this.action=typeof options.action==='function'?options.action:this.defaultAction;this.target=typeof options.target==='function'?options.target:this.defaultTarget;this.text=typeof options.text==='function'?options.text:this.defaultText;this.container=_typeof(options.container)==='object'?options.container:document.body;}},{key:'listenClick',value:function listenClick(trigger){var _this2=this;this.listener=(0,_goodListener2.default)(trigger,'click',function(e){return _this2.onClick(e);});}},{key:'onClick',value:function onClick(e){var trigger=e.delegateTarget||e.currentTarget;if(this.clipboardAction){this.clipboardAction=null;} this.clipboardAction=new _clipboardAction2.default({action:this.action(trigger),target:this.target(trigger),text:this.text(trigger),container:this.container,trigger:trigger,emitter:this});}},{key:'defaultAction',value:function defaultAction(trigger){return getAttributeValue('action',trigger);}},{key:'defaultTarget',value:function defaultTarget(trigger){var selector=getAttributeValue('target',trigger);if(selector){return document.querySelector(selector);}}},{key:'defaultText',value:function defaultText(trigger){return getAttributeValue('text',trigger);}},{key:'destroy',value:function destroy(){this.listener.destroy();if(this.clipboardAction){this.clipboardAction.destroy();this.clipboardAction=null;}}}],[{key:'isSupported',value:function isSupported(){var action=arguments.length>0&&arguments[0]!==undefined?arguments[0]:['copy','cut'];var actions=typeof action==='string'?[action]:action;var support=!!document.queryCommandSupported;actions.forEach(function(action){support=support&&!!document.queryCommandSupported(action);});return support;}}]);return Clipboard;}(_tinyEmitter2.default);function getAttributeValue(suffix,element){var attribute='data-clipboard-'+suffix;if(!element.hasAttribute(attribute)){return;} return element.getAttribute(attribute);} module.exports=Clipboard;});}),(function(module,exports){var DOCUMENT_NODE_TYPE=9;if(typeof Element!=='undefined'&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector;} function closest(element,selector){while(element&&element.nodeType!==DOCUMENT_NODE_TYPE){if(typeof element.matches==='function'&&element.matches(selector)){return element;} element=element.parentNode;}} module.exports=closest;}),(function(module,exports,__webpack_require__){var closest=__webpack_require__(4);function _delegate(element,selector,type,callback,useCapture){var listenerFn=listener.apply(this,arguments);element.addEventListener(type,listenerFn,useCapture);return{destroy:function(){element.removeEventListener(type,listenerFn,useCapture);}}} function delegate(elements,selector,type,callback,useCapture){if(typeof elements.addEventListener==='function'){return _delegate.apply(null,arguments);} if(typeof type==='function'){return _delegate.bind(null,document).apply(null,arguments);} if(typeof elements==='string'){elements=document.querySelectorAll(elements);} return Array.prototype.map.call(elements,function(element){return _delegate(element,selector,type,callback,useCapture);});} function listener(element,selector,type,callback){return function(e){e.delegateTarget=closest(e.target,selector);if(e.delegateTarget){callback.call(element,e);}}} module.exports=delegate;}),(function(module,exports){exports.node=function(value){return value!==undefined&&value instanceof HTMLElement&&value.nodeType===1;};exports.nodeList=function(value){var type=Object.prototype.toString.call(value);return value!==undefined&&(type==='[object NodeList]'||type==='[object HTMLCollection]')&&('length'in value)&&(value.length===0||exports.node(value[0]));};exports.string=function(value){return typeof value==='string'||value instanceof String;};exports.fn=function(value){var type=Object.prototype.toString.call(value);return type==='[object Function]';};}),(function(module,exports){function select(element){var selectedText;if(element.nodeName==='SELECT'){element.focus();selectedText=element.value;} else if(element.nodeName==='INPUT'||element.nodeName==='TEXTAREA'){var isReadOnly=element.hasAttribute('readonly');if(!isReadOnly){element.setAttribute('readonly','');} element.select();element.setSelectionRange(0,element.value.length);if(!isReadOnly){element.removeAttribute('readonly');} selectedText=element.value;} else{if(element.hasAttribute('contenteditable')){element.focus();} var selection=window.getSelection();var range=document.createRange();range.selectNodeContents(element);selection.removeAllRanges();selection.addRange(range);selectedText=selection.toString();} return selectedText;} module.exports=select;})]);});; /* /web/static/lib/jSignature/jSignatureCustom.js defined in bundle 'web.assets_common_lazy' */ ;(function(){var apinamespace='jSignature' var KickTimerClass=function(time,callback){var timer;this.kick=function(){clearTimeout(timer);timer=setTimeout(callback,time);} this.clear=function(){clearTimeout(timer);} return this;} var PubSubClass=function(context){'use strict' this.topics={};this.context=context?context:this;this.publish=function(topic,arg1,arg2,etc){'use strict' if(this.topics[topic]){var currentTopic=this.topics[topic],args=Array.prototype.slice.call(arguments,1),toremove=[],torun=[],fn,i,l,pair;for(i=0,l=currentTopic.length;i127){backcolorcomponents={'r':0,'g':0,'b':0};}else{backcolorcomponents={'r':255,'g':255,'b':255};}}else{backcolorcomponents={'r':255,'g':255,'b':255};}}else{tmp=undef;tmp=backcolor.match(rgbaregex);if(tmp){backcolorcomponents={'r':parseInt(tmp[1],10),'g':parseInt(tmp[2],10),'b':parseInt(tmp[3],10)};}else{tmp=backcolor.match(hexregex);if(tmp){backcolorcomponents={'r':parseInt(tmp[1],16),'g':parseInt(tmp[2],16),'b':parseInt(tmp[3],16)};}}} var toRGBfn=function(o){return'rgb('+[o.r,o.g,o.b].join(', ')+')'},decorcolorcomponents,frontcolorbrightness,adjusted;if(frontcolorcomponents&&backcolorcomponents){var backcolorbrightness=Math.max.apply(null,[frontcolorcomponents.r,frontcolorcomponents.g,frontcolorcomponents.b]);frontcolorbrightness=Math.max.apply(null,[backcolorcomponents.r,backcolorcomponents.g,backcolorcomponents.b]);adjusted=Math.round(frontcolorbrightness+(-1*(frontcolorbrightness-backcolorbrightness)*0.75));decorcolorcomponents={'r':adjusted,'g':adjusted,'b':adjusted};}else if(frontcolorcomponents){frontcolorbrightness=Math.max.apply(null,[frontcolorcomponents.r,frontcolorcomponents.g,frontcolorcomponents.b]);var polarity=+1;if(frontcolorbrightness>127){polarity=-1;} adjusted=Math.round(frontcolorbrightness+(polarity*96));decorcolorcomponents={'r':adjusted,'g':adjusted,'b':adjusted};}else{decorcolorcomponents={'r':191,'g':191,'b':191};} return{'color':frontcolor,'background-color':backcolorcomponents?toRGBfn(backcolorcomponents):backcolor,'decor-color':toRGBfn(decorcolorcomponents)};} function Vector(x,y){this.x=x;this.y=y;this.reverse=function(){return new this.constructor(this.x*-1,this.y*-1);};this._length=null;this.getLength=function(){if(!this._length){this._length=Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2));} return this._length;};var polarity=function(e){return Math.round(e/Math.abs(e));};this.resizeTo=function(length){if(this.x===0&&this.y===0){this._length=0;}else if(this.x===0){this._length=length;this.y=length*polarity(this.y);}else if(this.y===0){this._length=length;this.x=length*polarity(this.x);}else{var proportion=Math.abs(this.y/this.x),x=Math.sqrt(Math.pow(length,2)/(1+Math.pow(proportion,2))),y=proportion*x;this._length=length;this.x=x*polarity(this.x);this.y=y*polarity(this.y);} return this;};this.angleTo=function(vectorB){var divisor=this.getLength()*vectorB.getLength();if(divisor===0){return 0;}else{return Math.acos(Math.min(Math.max((this.x*vectorB.x+this.y*vectorB.y)/divisor,-1.0),1.0))/Math.PI;}};} function Point(x,y){this.x=x;this.y=y;this.getVectorToCoordinates=function(x,y){return new Vector(x-this.x,y-this.y);};this.getVectorFromCoordinates=function(x,y){return this.getVectorToCoordinates(x,y).reverse();};this.getVectorToPoint=function(point){return new Vector(point.x-this.x,point.y-this.y);};this.getVectorFromPoint=function(point){return this.getVectorToPoint(point).reverse();};} function DataEngine(storageObject,context,startStrokeFn,addToStrokeFn,endStrokeFn){this.data=storageObject;this.context=context;if(storageObject.length){var numofstrokes=storageObject.length,stroke,numofpoints;for(var i=0;i4){var positionInStroke=this._stroke.x.length;this._stroke.x.push(point.x);this._stroke.y.push(point.y);this._lastPoint=point;var stroke=this._stroke,fn=this.addToStrokeFn,context=this.context;setTimeout(function(){fn.call(context,stroke,positionInStroke)},3);return point;}else{return null;}};this.endStroke=function(){var c=this.inStroke;this.inStroke=false;this._lastPoint=null;if(c){var stroke=this._stroke,fn=this.endStrokeFn,context=this.context,changedfn=this.changed;setTimeout(function(){fn.call(context,stroke);changedfn.call(context);},3);return true;}else{return null;}};} var basicDot=function(ctx,x,y,size){var fillStyle=ctx.fillStyle;ctx.fillStyle=ctx.strokeStyle;ctx.fillRect(x+size/-2,y+size/-2,size,size);ctx.fillStyle=fillStyle;},basicLine=function(ctx,startx,starty,endx,endy){ctx.beginPath();ctx.moveTo(startx,starty);ctx.lineTo(endx,endy);ctx.closePath();ctx.stroke();},basicCurve=function(ctx,startx,starty,endx,endy,cp1x,cp1y,cp2x,cp2y){ctx.beginPath();ctx.moveTo(startx,starty);ctx.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,endx,endy);ctx.closePath();ctx.stroke();},strokeStartCallback=function(stroke){basicDot(this.canvasContext,stroke.x[0],stroke.y[0],this.settings.lineWidth);},strokeAddCallback=function(stroke,positionInStroke){var Cpoint=new Point(stroke.x[positionInStroke-1],stroke.y[positionInStroke-1]),Dpoint=new Point(stroke.x[positionInStroke],stroke.y[positionInStroke]),CDvector=Cpoint.getVectorToPoint(Dpoint);if(positionInStroke>1){var Bpoint=new Point(stroke.x[positionInStroke-2],stroke.y[positionInStroke-2]),BCvector=Bpoint.getVectorToPoint(Cpoint),ABvector;if(BCvector.getLength()>this.lineCurveThreshold){if(positionInStroke>2){ABvector=(new Point(stroke.x[positionInStroke-3],stroke.y[positionInStroke-3])).getVectorToPoint(Bpoint);}else{ABvector=new Vector(0,0);} var minlenfraction=0.05,maxlen=BCvector.getLength()*0.35,ABCangle=BCvector.angleTo(ABvector.reverse()),BCDangle=CDvector.angleTo(BCvector.reverse()),BCP1vector=new Vector(ABvector.x+BCvector.x,ABvector.y+BCvector.y).resizeTo(Math.max(minlenfraction,ABCangle)*maxlen),CCP2vector=(new Vector(BCvector.x+CDvector.x,BCvector.y+CDvector.y)).reverse().resizeTo(Math.max(minlenfraction,BCDangle)*maxlen);basicCurve(this.canvasContext,Bpoint.x,Bpoint.y,Cpoint.x,Cpoint.y,Bpoint.x+BCP1vector.x,Bpoint.y+BCP1vector.y,Cpoint.x+CCP2vector.x,Cpoint.y+CCP2vector.y);}} if(CDvector.getLength()<=this.lineCurveThreshold){basicLine(this.canvasContext,Cpoint.x,Cpoint.y,Dpoint.x,Dpoint.y);}},strokeEndCallback=function(stroke){var positionInStroke=stroke.x.length-1;if(positionInStroke>0){var Cpoint=new Point(stroke.x[positionInStroke],stroke.y[positionInStroke]),Bpoint=new Point(stroke.x[positionInStroke-1],stroke.y[positionInStroke-1]),BCvector=Bpoint.getVectorToPoint(Cpoint),ABvector;if(BCvector.getLength()>this.lineCurveThreshold){if(positionInStroke>1){ABvector=(new Point(stroke.x[positionInStroke-2],stroke.y[positionInStroke-2])).getVectorToPoint(Bpoint);var BCP1vector=new Vector(ABvector.x+BCvector.x,ABvector.y+BCvector.y).resizeTo(BCvector.getLength()/2);basicCurve(this.canvasContext,Bpoint.x,Bpoint.y,Cpoint.x,Cpoint.y,Bpoint.x+BCP1vector.x,Bpoint.y+BCP1vector.y,Cpoint.x,Cpoint.y);}else{basicLine(this.canvasContext,Bpoint.x,Bpoint.y,Cpoint.x,Cpoint.y);}}}} function conditionallyLinkCanvasResizeToWindowResize(jSignatureInstance,settingsWidth,apinamespace,globalEvents){'use strict' if(settingsWidth==='ratio'||settingsWidth.split('')[settingsWidth.length-1]==='%'){this.eventTokens[apinamespace+'.parentresized']=globalEvents.subscribe(apinamespace+'.parentresized',(function(eventTokens,$parent,originalParentWidth,sizeRatio){'use strict' return function(){'use strict' var w=$parent.width();if(w!==originalParentWidth){for(var key in eventTokens){if(eventTokens.hasOwnProperty(key)){globalEvents.unsubscribe(eventTokens[key]);delete eventTokens[key];}} var settings=jSignatureInstance.settings;jSignatureInstance.$parent.children().remove();for(var key in jSignatureInstance){if(jSignatureInstance.hasOwnProperty(key)){delete jSignatureInstance[key];}} settings.data=(function(data,scale){var newData=[];var o,i,l,j,m,stroke;for(i=0,l=data.length;i').appendTo($parent);})();this.isCanvasEmulator=false;var canvas=this.canvas=this.initializeCanvas(settings),$canvas=$(canvas);this.$controlbarLower=(function(){var controlbarstyle='padding:0 !important; margin:0 !important;'+'width: 100% !important; height: 0 !important; -ms-touch-action: none; touch-action: none;'+'margin-top:-1.5em !important; margin-bottom:1.5em !important; position: relative;';return $('
    ').appendTo($parent);})();this.canvasContext=canvas.getContext("2d");$canvas.data(apinamespace+'.this',this);settings.lineWidth=(function(defaultLineWidth,canvasWidth){if(!defaultLineWidth){return Math.max(Math.round(canvasWidth/400),2);}else{return defaultLineWidth;}})(settings.lineWidth,canvas.width);this.lineCurveThreshold=settings.lineWidth*3;if(settings.cssclass&&$.trim(settings.cssclass)!=""){$canvas.addClass(settings.cssclass);} this.fatFingerCompensation=0;var movementHandlers=(function(jSignatureInstance){var shiftX,shiftY,setStartValues=function(){var tos=$(jSignatureInstance.canvas).offset() shiftX=tos.left*-1 shiftY=tos.top*-1},getPointFromEvent=function(e){var firstEvent=(e.changedTouches&&e.changedTouches.length>0?e.changedTouches[0]:e);return new Point(Math.round(firstEvent.pageX+shiftX),Math.round(firstEvent.pageY+shiftY)+jSignatureInstance.fatFingerCompensation);},timer=new KickTimerClass(750,function(){jSignatureInstance.dataEngine.endStroke();});this.drawEndHandler=function(e){if(!jSignatureInstance.settings.readOnly){try{e.preventDefault();}catch(ex){} timer.clear();jSignatureInstance.dataEngine.endStroke();}};this.drawStartHandler=function(e){if(!jSignatureInstance.settings.readOnly){e.preventDefault();setStartValues();jSignatureInstance.dataEngine.startStroke(getPointFromEvent(e));timer.kick();}};this.drawMoveHandler=function(e){if(!jSignatureInstance.settings.readOnly){e.preventDefault();if(!jSignatureInstance.dataEngine.inStroke){return;} jSignatureInstance.dataEngine.addToStroke(getPointFromEvent(e));timer.kick();}};return this;}).call({},this);(function(drawEndHandler,drawStartHandler,drawMoveHandler){var canvas=this.canvas,$canvas=$(canvas),undef;if(this.isCanvasEmulator){$canvas.bind('mousemove.'+apinamespace,drawMoveHandler);$canvas.bind('mouseup.'+apinamespace,drawEndHandler);$canvas.bind('mousedown.'+apinamespace,drawStartHandler);}else{canvas.addEventListener('touchstart',function(e){canvas.onmousedown=canvas.onmouseup=canvas.onmousemove=undef;this.fatFingerCompensation=(settings.minFatFingerCompensation&&settings.lineWidth*-3>settings.minFatFingerCompensation)?settings.lineWidth*-3:settings.minFatFingerCompensation;drawStartHandler(e);canvas.addEventListener('touchend',drawEndHandler);canvas.addEventListener('touchstart',drawStartHandler);canvas.addEventListener('touchmove',drawMoveHandler);});canvas.addEventListener('mousedown',function(e){canvas.ontouchstart=canvas.ontouchend=canvas.ontouchmove=undef;drawStartHandler(e);canvas.addEventListener('mousedown',drawStartHandler);canvas.addEventListener('mouseup',drawEndHandler);canvas.addEventListener('mousemove',drawMoveHandler);});if(window.navigator.msPointerEnabled){canvas.onmspointerdown=drawStartHandler;canvas.onmspointerup=drawEndHandler;canvas.onmspointermove=drawMoveHandler;}}}).call(this,movementHandlers.drawEndHandler,movementHandlers.drawStartHandler,movementHandlers.drawMoveHandler) eventTokens[apinamespace+'.windowmouseup']=globalEvents.subscribe(apinamespace+'.windowmouseup',movementHandlers.drawEndHandler);this.events.publish(apinamespace+'.attachingEventHandlers');conditionallyLinkCanvasResizeToWindowResize.call(this,this,settings.width.toString(10),apinamespace,globalEvents);this.resetCanvas(settings.data);this.events.publish(apinamespace+'.initialized');return this;} jSignatureClass.prototype.resetCanvas=function(data,dontClear){var canvas=this.canvas,settings=this.settings,ctx=this.canvasContext,isCanvasEmulator=this.isCanvasEmulator,cw=canvas.width,ch=canvas.height;if(!dontClear){ctx.clearRect(0,0,cw+30,ch+30);} ctx.shadowColor=ctx.fillStyle=settings['background-color'] if(isCanvasEmulator){ctx.fillRect(0,0,cw+30,ch+30);} ctx.lineWidth=Math.ceil(parseInt(settings.lineWidth,10));ctx.lineCap=ctx.lineJoin="round";if(null!=settings['decor-color']&&settings['show-stroke']){ctx.strokeStyle=settings['decor-color'];ctx.shadowOffsetX=0;ctx.shadowOffsetY=0;var lineoffset=Math.round(ch/5);basicLine(ctx,lineoffset*1.5,ch-lineoffset,cw-(lineoffset*1.5),ch-lineoffset);} ctx.strokeStyle=settings.color;if(!isCanvasEmulator){ctx.shadowColor=ctx.strokeStyle;ctx.shadowOffsetX=ctx.lineWidth*0.5;ctx.shadowOffsetY=ctx.lineWidth*-0.6;ctx.shadowBlur=0;} if(!data){data=[];} var dataEngine=this.dataEngine=new DataEngine(data,this,strokeStartCallback,strokeAddCallback,strokeEndCallback);settings.data=data;$(canvas).data(apinamespace+'.data',data).data(apinamespace+'.settings',settings);dataEngine.changed=(function(target,events,apinamespace){'use strict' return function(){events.publish(apinamespace+'.change');target.trigger('change');}})(this.$parent,this.events,apinamespace);dataEngine.changed();return true;};function initializeCanvasEmulator(canvas){if(canvas.getContext){return false;}else{var window=canvas.ownerDocument.parentWindow;var FC=window.FlashCanvas?canvas.ownerDocument.parentWindow.FlashCanvas:(typeof FlashCanvas==="undefined"?undefined:FlashCanvas);if(FC){canvas=FC.initElement(canvas);var zoom=1;if(window&&window.screen&&window.screen.deviceXDPI&&window.screen.logicalXDPI){zoom=window.screen.deviceXDPI*1.0/window.screen.logicalXDPI;} if(zoom!==1){try{$(canvas).children('object').get(0).resize(Math.ceil(canvas.width*zoom),Math.ceil(canvas.height*zoom));canvas.getContext('2d').scale(zoom,zoom);}catch(ex){}} return true;}else{throw new Error("Canvas element does not support 2d context. jSignature cannot proceed.");}}} jSignatureClass.prototype.initializeCanvas=function(settings){var canvas=document.createElement('canvas'),$canvas=$(canvas);if(settings.width===settings.height&&settings.height==='ratio'){settings.width='100%';} $canvas.css({'margin':0,'padding':0,'border':'none','height':settings.height==='ratio'||!settings.height?1:settings.height.toString(10),'width':settings.width==='ratio'||!settings.width?1:settings.width.toString(10),'-ms-touch-action':'none','touch-action':'none','background-color':settings['background-color'],});$canvas.appendTo(this.$parent);if(settings.height==='ratio'){$canvas.css('height',Math.round($canvas.width()/settings.sizeRatio));}else if(settings.width==='ratio'){$canvas.css('width',Math.round($canvas.height()*settings.sizeRatio));} $canvas.addClass(apinamespace);canvas.width=$canvas.width();canvas.height=$canvas.height();this.isCanvasEmulator=initializeCanvasEmulator(canvas);canvas.onselectstart=function(e){if(e&&e.preventDefault){e.preventDefault()};if(e&&e.stopPropagation){e.stopPropagation()};return false;};return canvas;} var GlobalJSignatureObjectInitializer=function(window){var globalEvents=new PubSubClass();;(function(globalEvents,apinamespace,$,window){'use strict' var resizetimer,runner=function(){globalEvents.publish(apinamespace+'.parentresized')};$(window).bind('resize.'+apinamespace,function(){if(resizetimer){clearTimeout(resizetimer);} resizetimer=setTimeout(runner,500);}).bind('mouseup.'+apinamespace,function(e){globalEvents.publish(apinamespace+'.windowmouseup')});})(globalEvents,apinamespace,$,window) var jSignatureInstanceExtensions={};var exportplugins={'default':function(data){return this.toDataURL()},'native':function(data){return data},'image':function(data){var imagestring=this.toDataURL();if(typeof imagestring==='string'&&imagestring.length>4&&imagestring.slice(0,5)==='data:'&&imagestring.indexOf(',')!==-1){var splitterpos=imagestring.indexOf(',');return[imagestring.slice(5,splitterpos),imagestring.substr(splitterpos+1)];} return[];}};function _renderImageOnCanvas(data,formattype,rerendercallable){'use strict' var img=new Image(),c=this;img.onload=function(){var ctx=c.getContext("2d");var oldShadowColor=ctx.shadowColor;ctx.shadowColor="transparent";ctx.drawImage(img,0,0,(img.width','gte':'>=','lt':'<','lte':'<='},VOID_ELEMENTS:'area,base,br,col,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr'.split(','),tools:{exception:function(message,context){context=context||{};var prefix='QWeb2';if(context.template){prefix+=" - template['"+context.template+"']";} throw new Error(prefix+": "+message);},warning:function(message){if(typeof(window)!=='undefined'&&window.console){window.console.warn(message);}},trim:function(s,mode){switch(mode){case"left":return s.replace(/^\s*/,"");case"right":return s.replace(/\s*$/,"");default:return s.replace(/^\s*|\s*$/g,"");}},js_escape:function(s,noquotes){return(noquotes?'':"'")+s.replace(/\r?\n/g,"\\n").replace(/'/g,"\\'")+(noquotes?'':"'");},html_escape:function(s,attribute){if(s==null){return'';} s=String(s).replace(/&/g,'&').replace(//g,'>');if(attribute){s=s.replace(/"/g,'"');} return s;},gen_attribute:function(o){if(o!==null&&o!==undefined){if(o.constructor===Array){if(o[1]!==null&&o[1]!==undefined){return this.format_attribute(o[0],o[1]);}}else if(typeof o==='object'){var r='';for(var k in o){if(o.hasOwnProperty(k)){r+=this.gen_attribute([k,o[k]]);}} return r;}} return'';},format_attribute:function(name,value){return' '+name+'="'+this.html_escape(value,true)+'"';},extend:function(dst,src,exclude){for(var p in src){if(src.hasOwnProperty(p)&&!(exclude&&this.arrayIndexOf(exclude,p)!==-1)){dst[p]=src[p];}} return dst;},arrayIndexOf:function(array,item){for(var i=0,ilen=array.length;i';case 8:return'';} throw new Error('Unknown node type '+node.nodeType);}}},call:function(context,template,old_dict,_import,callback){var new_dict=this.extend({},old_dict);new_dict['__caller__']=old_dict['__template__'];if(callback){new_dict[0]=callback(context,new_dict);} return context.engine._render(template,new_dict);},foreach:function(context,enu,as,old_dict,callback){if(enu!=null){var index,jlen,cur;var new_dict=this.extend({},old_dict);new_dict[as+"_all"]=enu;var as_value=as+"_value",as_index=as+"_index",as_first=as+"_first",as_last=as+"_last",as_parity=as+"_parity";if(enu instanceof Array){var size=enu.length;new_dict[as+"_size"]=size;for(index=0,jlen=enu.length;index1){return self.tools.exception("Error: only one conditional branching directive is allowed per node");} var text_node;while((text_node=node.previousSibling)!==prev_elem){if(text_node.nodeType!==8&&self.tools.trim(text_node.nodeValue)){return self.tools.exception("Error: text is not allowed between branching directives");} text_node.parentNode.removeChild(text_node);}}else{return self.tools.exception("Error: t-elif and t-else directives must be preceded by a t-if or t-elif directive");}} return doc;},load_xml:function(s,callback){var self=this;var async=!!callback;s=this.tools.trim(s);if(s.charAt(0)==='<'){var tpl=this.load_xml_string(s);if(callback){callback(null,tpl);} return tpl;}else{var req=this.get_xhr();if(this.debug){s+='?debug='+(new Date()).getTime();} req.open('GET',s,async);if(async){req.addEventListener("load",function(){if(req.status==200||req.status==0){callback(null,self._parse_from_request(req));}else{callback(new Error("Can't load template "+s+", http status "+req.status));}});} req.send(null);if(!async){return this._parse_from_request(req);}}},_parse_from_request:function(req){var xDoc=req.responseXML;if(xDoc){if(!xDoc.documentElement){throw new Error("QWeb2: This xml document has no root document : "+xDoc.responseText);} if(xDoc.documentElement.nodeName=="parsererror"){throw new Error("QWeb2: Could not parse document :"+xDoc.documentElement.childNodes[0].nodeValue);} return xDoc;}else{return this.load_xml_string(req.responseText);}},load_xml_string:function(s){if(window.DOMParser){var dp=new DOMParser();var r=dp.parseFromString(s,"text/xml");if(r.body&&r.body.firstChild&&r.body.firstChild.nodeName=='parsererror'){throw new Error("QWeb2: Could not parse document :"+r.body.innerText);} return r;} var xDoc;try{xDoc=new ActiveXObject("MSXML2.DOMDocument");}catch(e){throw new Error("Could not find a DOM Parser: "+e.message);} xDoc.async=false;xDoc.preserveWhiteSpace=true;xDoc.loadXML(s);return xDoc;},has_template:function(template){return!!this.templates[template];},get_xhr:function(){if(window.XMLHttpRequest){return new window.XMLHttpRequest();} try{return new ActiveXObject('MSXML2.XMLHTTP.3.0');}catch(e){throw new Error("Could not get XHR");}},compile:function(node){var e=new QWeb2.Element(this,node);var template=node.getAttribute(this.prefix+'-name');return" /* 'this' refers to Qweb2.Engine instance */\n"+" var context = { engine : this, template : "+(this.tools.js_escape(template))+" };\n"+" dict = dict || {};\n"+" dict['__template__'] = '"+template+"';\n"+" var r = [];\n"+" /* START TEMPLATE */"+ (this.debug?"":" try {\n")+ (e.compile())+"\n"+" /* END OF TEMPLATE */"+ (this.debug?"":" } catch(error) {\n"+" if (console && console.exception) console.exception(error);\n"+" context.engine.tools.exception('Runtime Error: ' + error, context);\n")+ (this.debug?"":" }\n")+" return r.join('');";},render:function(template,dict){dict=dict||{};QWeb2.tools.extend(dict,this.default_dict);var r=this._render(template,dict);return r;},_render:function(template,dict){if(this.compiled_templates[template]){return this.compiled_templates[template].apply(this,[dict||{}]);}else if(this.templates[template]){var ext;if(ext=this.extend_templates[template]){var extend_node;while(extend_node=ext.shift()){this.extend(template,extend_node);}} var code=this.compile(this.templates[template]),tcompiled;try{tcompiled=new Function(['dict'],code);}catch(error){if(this.debug&&window.console){console.log(code);} this.tools.exception("Error evaluating template: "+error,{template:template});} if(!tcompiled){this.tools.exception("Error evaluating template: (IE?)"+error,{template:template});} this.compiled_templates[template]=tcompiled;return this.render(template,dict);}else{return this.tools.exception("Template '"+template+"' not found");}},extend:function(template,extend_node){var jQuery=this.jQuery;if(!jQuery){return this.tools.exception("Can't extend template "+template+" without jQuery");} var template_dest=this.templates[template];for(var i=0,ilen=extend_node.childNodes.length;i1){if(d.length===2){this.top("r.push(context.engine.tools.gen_attribute("+(this.format_expression(v))+"));");}else{this.top("r.push(context.engine.tools.gen_attribute(['"+d.slice(2).join('-')+"', ("+ (d[1]==='att'?this.format_expression(v):this.string_interpolation(v))+")]));");}}else{this.top_string(this.engine.tools.gen_attribute([a,v]));}} if(this.actions.opentag==='true'||(!this.children.length&&this.is_void_element)){this.top_string("/>");}else{this.top_string(">");this.bottom_string("");}}},compile_action_if:function(value){this.top("if ("+(this.format_expression(value))+") {");this.bottom("}");this.indent();},compile_action_elif:function(value){this.top("else if ("+(this.format_expression(value))+") {");this.bottom("}");this.indent();},compile_action_else:function(value){this.top("else {");this.bottom("}");this.indent();},compile_action_foreach:function(value){var as=this.actions['as']||value.replace(/[^a-zA-Z0-9]/g,'_');this.top("context.engine.tools.foreach(context, "+(this.format_expression(value))+", "+(this.engine.tools.js_escape(as))+", dict, function(context, dict) {");this.bottom("});");this.indent();},compile_action_call:function(value){if(this.children.length===0){return this.top("r.push(context.engine.tools.call(context, "+(this.string_interpolation(value))+", dict));");}else{this.top("r.push(context.engine.tools.call(context, "+(this.string_interpolation(value))+", dict, null, function(context, dict) {");this.bottom("}));");this.indent();this.top("var r = [];");return this.bottom("return r.join('');");}},compile_action_set:function(value){var variable=this.format_expression(value);if(this.actions['value']){if(this.children.length){this.engine.tools.warning("@set with @value plus node chidren found. Children are ignored.");} this.top(variable+" = ("+(this.format_expression(this.actions['value']))+");");this.process_children=false;}else{if(this.children.length===0){this.top(variable+" = '';");}else if(this.children.length===1&&this.children[0].node.nodeType===3){this.top(variable+" = "+(this.engine.tools.js_escape(this.children[0].node.data))+";");this.process_children=false;}else{this.top(variable+" = (function(dict) {");this.bottom("})(dict);");this.indent();this.top("var r = [];");this.bottom("return r.join('');");}}},compile_action_esc:function(value){this.top("var t = "+this.format_str(value)+";");this.top("if (t != null) r.push(context.engine.tools.html_escape(t));");this.top("else {");this.bottom("}");this.indent();},compile_action_raw:function(value){this.top("var t = "+this.format_str(value)+";");this.top("if (t != null) r.push(t);");this.top("else {");this.bottom("}");this.indent();},compile_action_js:function(value){this.top("(function("+value+") {");this.bottom("})(dict);");this.indent();var lines=this.engine.tools.xml_node_to_string(this.node,true).split(/\r?\n/);for(var i=0,ilen=lines.length;i").html(value_.label||value_.value||value_).text());});} $.extend(proto,{_initSource:function(){if(this.options.html&&$.isArray(this.options.source)){this.source=function(request,response){response(filter(this.options.source,request.term));};}else{initSource.call(this);}},_renderItem:function(ul,item){return $("
  • ").data("item.autocomplete",item).append($("")[this.options.html?"html":"text"](item.label)).appendTo(ul).addClass(item.classname);},});});; /* /web/static/src/js/libs/bootstrap.js defined in bundle 'web.assets_common_lazy' */ odoo.define('web.bootstrap.extensions',function(){'use strict';var bsSanitizeWhiteList=$.fn.tooltip.Constructor.Default.whiteList;bsSanitizeWhiteList['*'].push('title','style',/^data-[\w-]+/);bsSanitizeWhiteList.header=[];bsSanitizeWhiteList.main=[];bsSanitizeWhiteList.footer=[];bsSanitizeWhiteList.caption=[];bsSanitizeWhiteList.col=['span'];bsSanitizeWhiteList.colgroup=['span'];bsSanitizeWhiteList.table=[];bsSanitizeWhiteList.thead=[];bsSanitizeWhiteList.tbody=[];bsSanitizeWhiteList.tfooter=[];bsSanitizeWhiteList.tr=[];bsSanitizeWhiteList.th=['colspan','rowspan'];bsSanitizeWhiteList.td=['colspan','rowspan'];bsSanitizeWhiteList.address=[];bsSanitizeWhiteList.article=[];bsSanitizeWhiteList.aside=[];bsSanitizeWhiteList.blockquote=[];bsSanitizeWhiteList.section=[];bsSanitizeWhiteList.button=['type'];bsSanitizeWhiteList.del=[];function makeExtendedSanitizeWhiteList(extensions){var whiteList=_.clone($.fn.tooltip.Constructor.Default.whiteList);Object.keys(extensions).forEach(key=>{whiteList[key]=(whiteList[key]||[]).concat(extensions[key]);});return whiteList;} $.fn.tooltip.Constructor.Default.placement='auto';$.fn.tooltip.Constructor.Default.fallbackPlacement=['bottom','right','left','top'];$.fn.tooltip.Constructor.Default.html=true;$.fn.tooltip.Constructor.Default.trigger='hover';$.fn.tooltip.Constructor.Default.container='body';$.fn.tooltip.Constructor.Default.boundary='window';$.fn.tooltip.Constructor.Default.delay={show:1000,hide:0};var bootstrapShowFunction=$.fn.tooltip.Constructor.prototype.show;$.fn.tooltip.Constructor.prototype.show=function(){$('.tooltip').remove();return bootstrapShowFunction.call(this);};const bootstrapSpyRefreshFunction=$.fn.scrollspy.Constructor.prototype.refresh;$.fn.scrollspy.Constructor.prototype.refresh=function(){bootstrapSpyRefreshFunction.apply(this,arguments);if(this._scrollElement===window||this._config.method!=='offset'){return;} const baseScrollTop=this._getScrollTop();for(let i=0;i=0;},containsTextLike:function(element,index,matches){return element.innerText.toUpperCase().indexOf(matches[3].toUpperCase())>=0;},containsExact:function(element,index,matches){return $.trim(element.innerHTML)===matches[3];},containsExactText:function(element,index,matches){return element.innerText.trim()===matches[3].trim();},containsRegex:function(element,index,matches){var regreg=/^\/((?:\\\/|[^\/])+)\/([mig]{0,3})$/,reg=regreg.exec(matches[3]);return reg?new RegExp(reg[1],reg[2]).test($.trim(element.innerHTML)):false;},propChecked:function(element,index,matches){return $(element).prop("checked")===true;},propSelected:function(element,index,matches){return $(element).prop("selected")===true;},propValue:function(element,index,matches){return $(element).prop("value")===matches[3];},propValueContains:function(element,index,matches){return $(element).prop("value")&&$(element).prop("value").indexOf(matches[3])!==-1;},hasData:function(element){return!!_.toArray(element.dataset).length;},data:function(element,index,matches){return $(element).data(matches[3]);},hasVisibility:function(element,index,matches){var $element=$(element);if($(element).css('visibility')==='hidden'){return false;} var $parent=$element.parent();if(!$parent.length||$element.is('html')){return true;} return $parent.is(':hasVisibility');},hasOpacity:function(element,index,matches){var $element=$(element);if(parseFloat($(element).css('opacity'))<=0.01){return false;} var $parent=$element.parent();if(!$parent.length||$element.is('html')){return true;} return $parent.is(':hasOpacity');},});$.fn.extend({getAttributes:function(){var o={};if(this.length){var attrs=this[0].attributes;for(var i=0,l=attrs.length;iel.classList.remove('o_catch_attention',extraClass),400);} return this;},prependEvent:function(events,selector,data,handler){this.on.apply(this,arguments);events=events.split(' ');return this.each(function(){var el=this;_.each(events,function(evNameNamespaced){var evName=evNameNamespaced.split('.')[0];var handler=$._data(el,'events')[evName].pop();$._data(el,'events')[evName].unshift(handler);});});},closestScrollable(){let $el=this;while($el[0]!==document.scrollingElement){if($el.isScrollable()){return $el;} $el=$el.parent();} return $el;},compensateScrollbar(add=true,isScrollElement=true,cssProperty='padding-right'){for(const el of this){el.style.removeProperty(cssProperty);if(!add){return;} const scrollableEl=isScrollElement?el:$(el).parent().closestScrollable()[0];const style=window.getComputedStyle(el);const newValue=parseInt(style[cssProperty])+scrollableEl.offsetWidth-scrollableEl.clientWidth;el.style.setProperty(cssProperty,`${newValue}px`,'important');}},getScrollingElement(){const $baseScrollingElement=$(document.scrollingElement);if($baseScrollingElement.isScrollable()&&$baseScrollingElement.hasScrollableContent()){return $baseScrollingElement;} const bodyHeight=$(document.body).height();for(const el of document.body.children){if(bodyHeight-el.scrollHeight>1.5){continue;} const $el=$(el);if($el.isScrollable()){return $el;}} return $baseScrollingElement;},hasScrollableContent(){return this[0].scrollHeight>this[0].clientHeight;},isScrollable(){const overflow=this.css('overflow-y');return overflow==='auto'||overflow==='scroll'||(overflow==='visible'&&this===document.scrollingElement);},});const originalScrollTop=$.fn.scrollTop;$.fn.scrollTop=function(value){if(value!==undefined&&this.filter('html, body').length){originalScrollTop.apply(this.not('html, body').add($().getScrollingElement()),arguments);return this;}else if(value===undefined&&this.eq(0).is('html, body')){return originalScrollTop.apply($().getScrollingElement(),arguments);} return originalScrollTop.apply(this,arguments);};const originalAnimate=$.fn.animate;$.fn.animate=function(properties,...rest){const props=Object.assign({},properties);if('scrollTop'in props&&this.filter('html, body').length){originalAnimate.call(this.not('html, body').add($().getScrollingElement()),{'scrollTop':props['scrollTop']},...rest);delete props['scrollTop'];} if(!Object.keys(props).length){return this;} return originalAnimate.call(this,props,...rest);};});; /* /web/static/src/js/libs/download.js defined in bundle 'web.assets_common_lazy' */ odoo.define('web.download',function(){return function download(data,filename,mimetype){var self=window,defaultMime="application/octet-stream",mimeType=mimetype||defaultMime,payload=data,url=!filename&&!mimetype&&payload,anchor=document.createElement("a"),toString=function(a){return String(a);},myBlob=(self.Blob||self.MozBlob||self.WebKitBlob||toString),fileName=filename||"download",blob,reader;myBlob=myBlob.call?myBlob.bind(self):Blob;if(String(this)==="true"){payload=[payload,mimeType];mimeType=payload[0];payload=payload[1];} if(url&&url.length<2048){fileName=url.split("/").pop().split("?")[0];anchor.href=url;if(anchor.href.indexOf(url)!==-1){var ajax=new XMLHttpRequest();ajax.open("GET",url,true);ajax.responseType='blob';ajax.onload=function(e){download(e.target.response,fileName,defaultMime);};setTimeout(function(){ajax.send();},0);return ajax;}} if(/^data:[\w+\-]+\/[\w+\-]+[,;]/.test(payload)){if(payload.length>(1024*1024*1.999)&&myBlob!==toString){payload=dataUrlToBlob(payload);mimeType=payload.type||defaultMime;}else{return navigator.msSaveBlob?navigator.msSaveBlob(dataUrlToBlob(payload),fileName):saver(payload);}} blob=payload instanceof myBlob?payload:new myBlob([payload],{type:mimeType});function dataUrlToBlob(strUrl){var parts=strUrl.split(/[:;,]/),type=parts[1],decoder=parts[2]==="base64"?atob:decodeURIComponent,binData=decoder(parts.pop()),mx=binData.length,i=0,uiArr=new Uint8Array(mx);for(i;iwait){if(timeout){clearTimeout(timeout);timeout=null;} previous=now;result=func.apply(context,args);if(!timeout)context=args=null;}else if(!timeout&&options.trailing!==false){timeout=setTimeout(later,remaining);} return result;};throttled.cancel=function(){clearTimeout(timeout);previous=0;timeout=context=args=null;};return throttled;};; /* /web/static/src/js/libs/popper.js defined in bundle 'web.assets_common_lazy' */ Popper.Defaults.modifiers.preventOverflow.priority=['right','left','bottom','top'];; /* /web/static/src/js/libs/fullcalendar.js defined in bundle 'web.assets_common_lazy' */ odoo.define('/web/static/src/js/libs/fullcalendar.js',function(){"use strict";function createYearCalendarView(FullCalendar){const{Calendar,createElement,EventApi,memoizeRendering,View,}=FullCalendar;class YearView extends View{constructor(){super(...arguments);this.months=null;this.renderSubCalendarsMem=memoizeRendering(this.renderSubCalendars,this.unrenderSubCalendars);this.events=[];} get currentDate(){return this.context.calendar.state.currentDate;} destroy(){this.renderSubCalendarsMem.unrender();super.destroy();} unselect(){for(const{calendar}of this.months){calendar.unselect();}} render(){this.renderSubCalendarsMem(this.context);super.render(...arguments);} renderSubCalendars(){this.el.classList.add('fc-scroller');if(!this.context.options.selectable){this.el.classList.add('fc-readonly-year-view');} this.months=[];for(let monthNumber=0;monthNumber<12;monthNumber++){const monthDate=new Date(this.currentDate.getFullYear(),monthNumber);const monthShortName=moment(monthDate).format('MMM').toLowerCase();const container=createElement('div',{class:'fc-month-container'});this.el.appendChild(container);const el=createElement('div',{class:`fc-month fc-month-${monthShortName}`,});container.appendChild(el);const calendar=this._createMonthCalendar(el,monthDate);this.months.push({el,calendar});calendar.render();}} unrenderSubCalendars(){for(const{el,calendar}of this.months){calendar.destroy();el.remove();}} renderEvents(){if(this.datesRendered){this.datesRendered=false;return;} this.events=this._computeEvents();for(const{calendar}of this.months){calendar.refetchEvents();} this._setCursorOnEventDates();} renderDates(){this.events=this._computeEvents();for(const[monthNumber,{calendar}]of Object.entries(this.months)){const monthDate=new Date(this.currentDate.getFullYear(),monthNumber);calendar.gotoDate(monthDate);} this._setCursorOnEventDates();this.datesRendered=true;} _computeEvents(){const calendar=this.context.calendar;return calendar.getEvents().map(event=>{const endUTC=calendar.dateEnv.toDate(event._instance.range.end);const end=new Date(event._instance.range.end);if(endUTC.getHours()>0||endUTC.getMinutes()>0||endUTC.getSeconds()>0||endUTC.getMilliseconds()>0){end.setDate(end.getDate()+1);} const instance=Object.assign({},event._instance,{range:{start:new Date(event._instance.range.start),end},});const def=Object.assign({},event._def,{rendering:'background',allDay:true,});return new EventApi(this.context.calendar,def,instance);});} _createMonthCalendar(container,monthDate){return new Calendar(container,Object.assign({},this.context.options,{defaultDate:monthDate,defaultView:'dayGridMonth',header:{left:false,center:'title',right:false},titleFormat:{month:'short',year:'numeric'},height:0,contentHeight:0,weekNumbers:false,showNonCurrentDates:false,views:{dayGridMonth:{columnHeaderText:(date)=>moment(date).format("ddd")[0],},},selectMinDistance:5,dateClick:this._onYearDateClick.bind(this),datesRender:undefined,events:(info,successCB)=>{successCB(this.events);},windowResize:undefined,}));} _setCursorOnEventDates(){for(const el of this.el.querySelectorAll('.fc-has-event')){el.classList.remove('fc-has-event');} for(const event of Object.values(this.events)){let currentDate=moment(event._instance.range.start);while(currentDate.isBefore(event._instance.range.end,'day')){const formattedDate=currentDate.format('YYYY-MM-DD');const el=this.el.querySelector(`.fc-day-top[data-date="${formattedDate}"]`);if(el){el.classList.add('fc-has-event');} currentDate.add(1,'days');}}} _onYearDateClick(info){const calendar=this.context.calendar;const events=Object.values(this.events).filter(event=>{const startUTC=calendar.dateEnv.toDate(event._instance.range.start);const endUTC=calendar.dateEnv.toDate(event._instance.range.end);const start=moment(startUTC);const end=moment(endUTC);const inclusivity=start.isSame(end,'day')?'[]':'[)';return moment(info.date).isBetween(start,end,'day',inclusivity);}).map(event=>{return Object.assign({},event._def,event._instance.range);});const yearDateInfo=Object.assign({},info,{view:this,monthView:info.view,events,selectable:this.context.options.selectable,});calendar.publiclyTrigger('yearDateClick',[yearDateInfo]);}} return FullCalendar.createPlugin({views:{dayGridYear:{class:YearView,duration:{years:1},defaults:{fixedWeekCount:true,},},},});} return{createYearCalendarView,};});; /* /web/static/src/js/chrome/keyboard_navigation_mixin.js defined in bundle 'web.assets_common_lazy' */ odoo.define('web.KeyboardNavigationMixin',function(require){"use strict";var BrowserDetection=require('web.BrowserDetection');const core=require('web.core');var knownUnusableAccessKeys=[' ','A','B','C','H','J','K','L','N','P','S','Q','E','F','D','0','1','2','3','4','5','6','7','8','9'];var KeyboardNavigationMixin={events:{'keydown':'_onKeyDown','keyup':'_onKeyUp',},init:function(options){this.options=Object.assign({autoAccessKeys:true,},options);this._areAccessKeyVisible=false;this.BrowserDetection=new BrowserDetection();},start:function(){const temp=this._hideAccessKeyOverlay.bind(this);this._hideAccessKeyOverlay=()=>temp();window.addEventListener('blur',this._hideAccessKeyOverlay);core.bus.on('click',null,this._hideAccessKeyOverlay);},destroy:function(){window.removeEventListener('blur',this._hideAccessKeyOverlay);core.bus.off('click',null,this._hideAccessKeyOverlay);},_addAccessKeyOverlays:function(){var accesskeyElements=$(document).find('[accesskey]').filter(':visible');_.each(accesskeyElements,function(elem){var overlay=$(_.str.sprintf("
    %s
    ",$(elem).attr('accesskey').toUpperCase()));var $overlayParent;if(elem.tagName.toUpperCase()==="INPUT"){$overlayParent=$(elem).parent();}else{$overlayParent=$(elem);} if($overlayParent.css('position')!=='absolute'){$overlayParent.css('position','relative');} overlay.appendTo($overlayParent);});},_getAllUsedAccessKeys:function(){var usedAccessKeys=knownUnusableAccessKeys.slice();this.$el.find('[accesskey]').each(function(_,elem){usedAccessKeys.push(elem.accessKey.toUpperCase());});return usedAccessKeys;},_hideAccessKeyOverlay:function(){this._areAccessKeyVisible=false;var overlays=this.$el.find('.o_web_accesskey_overlay');if(overlays.length){return overlays.remove();}},_setAccessKeyOnTopNavigation:function(){this.$el.find('.o_menu_sections>li>a').each(function(number,item){item.accessKey=number+1;});},_onKeyDown:function(keyDownEvent){if($('body.o_ui_blocked').length&&(keyDownEvent.altKey||keyDownEvent.key==='Alt')&&!keyDownEvent.ctrlKey){if(keyDownEvent.preventDefault)keyDownEvent.preventDefault();else keyDownEvent.returnValue=false;if(keyDownEvent.stopPropagation)keyDownEvent.stopPropagation();if(keyDownEvent.cancelBubble)keyDownEvent.cancelBubble=true;return false;} if(!this._areAccessKeyVisible&&(keyDownEvent.altKey||keyDownEvent.key==='Alt')&&!keyDownEvent.ctrlKey){this._areAccessKeyVisible=true;this._setAccessKeyOnTopNavigation();var usedAccessKey=this._getAllUsedAccessKeys();if(this.options.autoAccessKeys){var buttonsWithoutAccessKey=this.$el.find('button.btn:visible').not('[accesskey]').not('[disabled]').not('[tabindex="-1"]');_.each(buttonsWithoutAccessKey,function(elem){var buttonString=[elem.innerText,elem.title,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"].join('');for(var letterIndex=0;letterIndex='A'&&candidateAccessKey<='Z'&&!_.includes(usedAccessKey,candidateAccessKey)){elem.accessKey=candidateAccessKey;usedAccessKey.push(candidateAccessKey);break;}}});} var elementsWithoutAriaKeyshortcut=this.$el.find('[accesskey]').not('[aria-keyshortcuts]');_.each(elementsWithoutAriaKeyshortcut,function(elem){elem.setAttribute('aria-keyshortcuts','Alt+Shift+'+elem.accessKey);});this._addAccessKeyOverlays();} if(this.BrowserDetection.isOsMac()) return;if(keyDownEvent.altKey&&!keyDownEvent.ctrlKey&&keyDownEvent.key.length===1){var elementWithAccessKey=[];if(keyDownEvent.keyCode>=65&&keyDownEvent.keyCode<=90||keyDownEvent.keyCode>=97&&keyDownEvent.keyCode<=122){elementWithAccessKey=document.querySelectorAll('[accesskey="'+String.fromCharCode(keyDownEvent.keyCode).toLowerCase()+'"], [accesskey="'+String.fromCharCode(keyDownEvent.keyCode).toUpperCase()+'"]');if(elementWithAccessKey.length){if(this.BrowserDetection.isOsMac()||!this.BrowserDetection.isBrowserChrome()){elementWithAccessKey[0].focus();elementWithAccessKey[0].click();if(keyDownEvent.preventDefault)keyDownEvent.preventDefault();else keyDownEvent.returnValue=false;if(keyDownEvent.stopPropagation)keyDownEvent.stopPropagation();if(keyDownEvent.cancelBubble)keyDownEvent.cancelBubble=true;return false;}}} else{var numberKey;if(keyDownEvent.originalEvent.code&&keyDownEvent.originalEvent.code.indexOf('Digit')===0){numberKey=keyDownEvent.originalEvent.code[keyDownEvent.originalEvent.code.length-1];}else if(keyDownEvent.originalEvent.key&&keyDownEvent.originalEvent.key.length===1&&keyDownEvent.originalEvent.key>='0'&&keyDownEvent.originalEvent.key<='9'){numberKey=keyDownEvent.originalEvent.key;}else if(keyDownEvent.keyCode>=48&&keyDownEvent.keyCode<=57){numberKey=keyDownEvent.keyCode-48;} if(numberKey>='0'&&numberKey<='9'){elementWithAccessKey=document.querySelectorAll('[accesskey="'+numberKey+'"]');if(elementWithAccessKey.length){elementWithAccessKey[0].click();if(keyDownEvent.preventDefault)keyDownEvent.preventDefault();else keyDownEvent.returnValue=false;if(keyDownEvent.stopPropagation)keyDownEvent.stopPropagation();if(keyDownEvent.cancelBubble)keyDownEvent.cancelBubble=true;return false;}}}}},_onKeyUp:function(keyUpEvent){if((keyUpEvent.altKey||keyUpEvent.key==='Alt')&&!keyUpEvent.ctrlKey){this._hideAccessKeyOverlay();if(keyUpEvent.preventDefault)keyUpEvent.preventDefault();else keyUpEvent.returnValue=false;if(keyUpEvent.stopPropagation)keyUpEvent.stopPropagation();if(keyUpEvent.cancelBubble)keyUpEvent.cancelBubble=true;return false;}},};return KeyboardNavigationMixin;});; /* /web/static/src/js/core/abstract_service.js defined in bundle 'web.assets_common_lazy' */ odoo.define('web.AbstractService',function(require){"use strict";var Class=require('web.Class');const{serviceRegistry}=require("web.core");var Mixins=require('web.mixins');var ServicesMixin=require('web.ServicesMixin');var AbstractService=Class.extend(Mixins.EventDispatcherMixin,ServicesMixin,{dependencies:[],init:function(env){Mixins.EventDispatcherMixin.init.call(this,arguments);this.env=env;},start:function(){},_trigger_up:function(ev){Mixins.EventDispatcherMixin._trigger_up.apply(this,arguments);if(ev.is_stopped()){return;} const payload=ev.data;if(ev.name==='call_service'){let args=payload.args||[];if(payload.service==='ajax'&&payload.method==='rpc'){args=args.concat(ev.target);} const service=this.env.services[payload.service];const result=service[payload.method].apply(service,args);payload.callback(result);}else if(ev.name==='do_action'){this.env.bus.trigger('do-action',payload);}},deployServices(env){const UndeployedServices=Object.assign({},serviceRegistry.map);function _deployServices(){let done=false;while(!done){const serviceName=Object.keys(UndeployedServices).find(serviceName=>{const Service=UndeployedServices[serviceName];return Service.prototype.dependencies.every(depName=>{return env.services[depName];});});if(serviceName){const Service=UndeployedServices[serviceName];const service=new Service(env);env.services[serviceName]=service;delete UndeployedServices[serviceName];service.start();}else{done=true;}}} serviceRegistry.onAdd((serviceName,Service)=>{if(serviceName in env.services||serviceName in UndeployedServices){throw new Error(`Service ${serviceName} is already loaded.`);} UndeployedServices[serviceName]=Service;_deployServices();});_deployServices();}});return AbstractService;});; /* /web/static/src/js/core/abstract_storage_service.js defined in bundle 'web.assets_common_lazy' */ odoo.define('web.AbstractStorageService',function(require){'use strict';var AbstractService=require('web.AbstractService');var AbstractStorageService=AbstractService.extend({storage:null,destroy:function(){if((this.storage||{}).destroy){this.storage.destroy();} this._super.apply(this,arguments);},clear:function(){this.storage.clear();},getItem:function(key,defaultValue){var val=this.storage.getItem(key);return val?JSON.parse(val):defaultValue;},key:function(index){return this.storage.key(index);},length:function(){return this.storage.length;},removeItem:function(key){this.storage.removeItem(key);},setItem:function(key,value){this.storage.setItem(key,JSON.stringify(value));},onStorage:function(){this.storage.on.apply(this.storage,["storage"].concat(Array.prototype.slice.call(arguments)));},});return AbstractStorageService;});; /* /web/static/src/js/core/ajax.js defined in bundle 'web.assets_common_lazy' */ odoo.define('web.ajax',function(require){"use strict";var config=require('web.config');var concurrency=require('web.concurrency');var core=require('web.core');var time=require('web.time');var download=require('web.download');var contentdisposition=require('web.contentdisposition');var _t=core._t;var ajax={};function _genericJsonRpc(fct_name,params,settings,fct){var shadow=settings.shadow||false;delete settings.shadow;if(!shadow){core.bus.trigger('rpc_request');} var data={jsonrpc:"2.0",method:fct_name,params:params,id:Math.floor(Math.random()*1000*1000*1000)};var xhr=fct(data);var result=xhr.then(function(result){core.bus.trigger('rpc:result',data,result);if(result.error!==undefined){if(result.error.data.arguments[0]!=="bus.Bus not available in test mode"){console.debug("Server application error\n","Error code:",result.error.code,"\n","Error message:",result.error.message,"\n","Error data message:\n",result.error.data.message,"\n","Error data debug:\n",result.error.data.debug);} return Promise.reject({type:"server",error:result.error});}else{return result.result;}},function(){var reason={type:'communication',error:arguments[0],textStatus:arguments[1],errorThrown:arguments[2],};return Promise.reject(reason);});var rejection;var promise=new Promise(function(resolve,reject){rejection=reject;result.then(function(result){if(!shadow){core.bus.trigger('rpc_response');} resolve(result);},function(reason){var type=reason.type;var error=reason.error;var textStatus=reason.textStatus;var errorThrown=reason.errorThrown;if(type==="server"){if(!shadow){core.bus.trigger('rpc_response');} if(error.code===100){core.bus.trigger('invalidate_session');} reject({message:error,event:$.Event()});}else{if(!shadow){core.bus.trigger('rpc_response_failed');} var nerror={code:-32098,message:"XmlHttpRequestError "+errorThrown,data:{type:"xhr"+textStatus,debug:error.responseText,objects:[error,errorThrown],arguments:[reason||textStatus]},};reject({message:nerror,event:$.Event()});}});});promise.abort=function(){rejection({message:"XmlHttpRequestError abort",event:$.Event('abort')});if(xhr.abort){xhr.abort();}};promise.guardedCatch(function(reason){setTimeout(function(){if(!reason.event.isDefaultPrevented()){core.bus.trigger('rpc_error',reason.message,reason.event);}},0);});return promise;};function jsonRpc(url,fct_name,params,settings){settings=settings||{};return _genericJsonRpc(fct_name,params,settings,function(data){return $.ajax(url,_.extend({},settings,{url:url,dataType:'json',type:'POST',data:JSON.stringify(data,time.date_to_utc),contentType:'application/json'}));});} function rpc(url,params,settings){return jsonRpc(url,'call',params,settings);} var loadCSS=(function(){var urlDefs={};return function loadCSS(url){if(url in urlDefs){}else if($('link[href="'+url+'"]').length){urlDefs[url]=Promise.resolve();}else{var $link=$('',{'href':url,'rel':'stylesheet','type':'text/css'});urlDefs[url]=new Promise(function(resolve,reject){$link.on('load',function(){resolve();}).on('error',function(){reject(new Error("Couldn't load css dependency: "+$link[0].href));});});$('head').append($link);} return urlDefs[url];};})();var loadJS=(function(){var dependenciesPromise={};var load=function loadJS(url){var alreadyRequired=($('script[src="'+url+'"]').length>0);if(url in dependenciesPromise){return dependenciesPromise[url];} var scriptLoadedPromise=new Promise(function(resolve,reject){if(alreadyRequired){resolve();}else{var script=document.createElement('script');script.type='text/javascript';script.src=url;script.onload=script.onreadystatechange=function(){if((script.readyState&&script.readyState!=="loaded"&&script.readyState!=="complete")||script.onload_done){return;} script.onload_done=true;resolve(url);};script.onerror=function(){console.error("Error loading file",script.src);reject(url);};var head=document.head||document.getElementsByTagName('head')[0];head.appendChild(script);}});dependenciesPromise[url]=scriptLoadedPromise;return scriptLoadedPromise;};return load;})();function get_file(options){var xhr=new XMLHttpRequest();var data;if(options.form){xhr.open(options.form.method,options.form.action);data=new FormData(options.form);}else{xhr.open('POST',options.url);data=new FormData();_.each(options.data||{},function(v,k){data.append(k,v);});} data.append('token','dummy-because-api-expects-one');if(core.csrf_token){data.append('csrf_token',core.csrf_token);} xhr.responseType='blob';xhr.onload=function(){var mimetype=xhr.response.type;if(xhr.status===200&&mimetype!=='text/html'){var header=(xhr.getResponseHeader('Content-Disposition')||'').replace(/;$/,'');var filename=header?contentdisposition.parse(header).parameters.filename:null;download(xhr.response,filename,mimetype);if(options.success){options.success();} return true;} if(!options.error){return true;} var decoder=new FileReader();decoder.onload=function(){var contents=decoder.result;var err;var doc=new DOMParser().parseFromString(contents,'text/html');var nodes=doc.body.children.length===0?doc.body.childNodes:doc.body.children;try{var node=nodes[1]||nodes[0];err=JSON.parse(node.textContent);}catch(e){err={message:nodes.length>1?nodes[1].textContent:'',data:{name:String(xhr.status),title:nodes.length>0?nodes[0].textContent:'',}};} options.error(err);};decoder.readAsText(xhr.response);};xhr.onerror=function(){if(options.error){options.error({message:_t("Something happened while trying to contact the server, check that the server is online and that you still have a working network connection."),data:{title:_t("Could not connect to the server")}});}};if(options.complete){xhr.onloadend=function(){options.complete();};} xhr.send(data);return true;} function post(controller_url,data){var postData=new FormData();$.each(data,function(i,val){postData.append(i,val);});if(core.csrf_token){postData.append('csrf_token',core.csrf_token);} return new Promise(function(resolve,reject){$.ajax(controller_url,{data:postData,processData:false,contentType:false,type:'POST'}).then(resolve).fail(reject);});} var loadXML=(function(){var isLoading=false;var loadingsData=[];var seenURLs=[];return function(url,qweb){function _load(){isLoading=true;if(loadingsData.length){var loadingData=loadingsData[0];loadingData.qweb.add_template(loadingData.url,function(){loadingsData.shift();loadingData.resolve();_load();});}else{isLoading=false;}} if(!url||!qweb){return Promise.resolve();} if(_.contains(seenURLs,url)){var oldLoadingData=_.findWhere(loadingsData,{url:url});return oldLoadingData?oldLoadingData.def:Promise.resolve();} seenURLs.push(url);var newLoadingData={url:url,qweb:qweb,};newLoadingData.def=new Promise(function(resolve,reject){newLoadingData.resolve=resolve;newLoadingData.reject=reject;});loadingsData.push(newLoadingData);if(!isLoading){_load();} return newLoadingData.def;};})();var loadAsset=(function(){var cache={};var load=function loadAsset(xmlId,context,tplRoute='/web/dataset/call_kw/'){if(cache[xmlId]){return cache[xmlId];} context=_.extend({},odoo.session_info.user_context,context);const params={args:[xmlId,{debug:config.isDebug()}],kwargs:{context:context,},};if(tplRoute==='/web/dataset/call_kw/'){Object.assign(params,{model:'ir.ui.view',method:'render_public_asset',});} cache[xmlId]=rpc(tplRoute,params).then(function(xml){var $xml=$(xml);return{cssLibs:$xml.filter('link[href]:not([type="image/x-icon"])').map(function(){return $(this).attr('href');}).get(),cssContents:$xml.filter('style').map(function(){return $(this).html();}).get(),jsLibs:$xml.filter('script[src]').map(function(){return $(this).attr('src');}).get(),jsContents:$xml.filter('script:not([src])').map(function(){return $(this).html();}).get(),};}).guardedCatch(reason=>{reason.event.preventDefault();throw`Unable to render the required templates for the assets to load: ${reason.message.message}`;});return cache[xmlId];};return load;})();function loadLibs(libs,context,tplRoute){var mutex=new concurrency.Mutex();mutex.exec(function(){var defs=[];var cssLibs=[libs.cssLibs||[]];defs.push(_loadArray(cssLibs,ajax.loadCSS).then(function(){if(libs.cssContents&&libs.cssContents.length){$('head').append($('
    ').addClass('cw').text('#'));} while(currentDate.isBefore(this._viewDate.clone().endOf('w'))){row.append($('').addClass('dow').text(currentDate.format('dd')));currentDate.add(1,'d');} this.widget.find('.datepicker-days thead').append(row);};TempusDominusBootstrap4.prototype._fillMonths=function _fillMonths(){var spans=[],monthsShort=this._viewDate.clone().startOf('y').startOf('d');while(monthsShort.isSame(this._viewDate,'y')){spans.push($('').attr('data-action','selectMonth').addClass('month').text(monthsShort.format('MMM')));monthsShort.add(1,'M');} this.widget.find('.datepicker-months td').empty().append(spans);};TempusDominusBootstrap4.prototype._updateMonths=function _updateMonths(){var monthsView=this.widget.find('.datepicker-months'),monthsViewHeader=monthsView.find('th'),months=monthsView.find('tbody').find('span'),self=this;monthsViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevYear);monthsViewHeader.eq(1).attr('title',this._options.tooltips.selectYear);monthsViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextYear);monthsView.find('.disabled').removeClass('disabled');if(!this._isValid(this._viewDate.clone().subtract(1,'y'),'y')){monthsViewHeader.eq(0).addClass('disabled');} monthsViewHeader.eq(1).text(this._viewDate.year());if(!this._isValid(this._viewDate.clone().add(1,'y'),'y')){monthsViewHeader.eq(2).addClass('disabled');} months.removeClass('active');if(this._getLastPickedDate().isSame(this._viewDate,'y')&&!this.unset){months.eq(this._getLastPickedDate().month()).addClass('active');} months.each(function(index){if(!self._isValid(self._viewDate.clone().month(index),'M')){$(this).addClass('disabled');}});};TempusDominusBootstrap4.prototype._getStartEndYear=function _getStartEndYear(factor,year){var step=factor/10,startYear=Math.floor(year/factor)*factor,endYear=startYear+step*9,focusValue=Math.floor(year/step)*step;return[startYear,endYear,focusValue];};TempusDominusBootstrap4.prototype._updateYears=function _updateYears(){var yearsView=this.widget.find('.datepicker-years'),yearsViewHeader=yearsView.find('th'),yearCaps=this._getStartEndYear(10,this._viewDate.year()),startYear=this._viewDate.clone().year(yearCaps[0]),endYear=this._viewDate.clone().year(yearCaps[1]);var html='';yearsViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevDecade);yearsViewHeader.eq(1).attr('title',this._options.tooltips.selectDecade);yearsViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextDecade);yearsView.find('.disabled').removeClass('disabled');if(this._options.minDate&&this._options.minDate.isAfter(startYear,'y')){yearsViewHeader.eq(0).addClass('disabled');} yearsViewHeader.eq(1).text(startYear.year()+'-'+endYear.year());if(this._options.maxDate&&this._options.maxDate.isBefore(endYear,'y')){yearsViewHeader.eq(2).addClass('disabled');} html+=''+(startYear.year()-1)+'';while(!startYear.isAfter(endYear,'y')){html+=''+startYear.year()+'';startYear.add(1,'y');} html+=''+startYear.year()+'';yearsView.find('td').html(html);};TempusDominusBootstrap4.prototype._updateDecades=function _updateDecades(){var decadesView=this.widget.find('.datepicker-decades'),decadesViewHeader=decadesView.find('th'),yearCaps=this._getStartEndYear(100,this._viewDate.year()),startDecade=this._viewDate.clone().year(yearCaps[0]),endDecade=this._viewDate.clone().year(yearCaps[1]);var minDateDecade=false,maxDateDecade=false,endDecadeYear=void 0,html='';decadesViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevCentury);decadesViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextCentury);decadesView.find('.disabled').removeClass('disabled');if(startDecade.year()===0||this._options.minDate&&this._options.minDate.isAfter(startDecade,'y')){decadesViewHeader.eq(0).addClass('disabled');} decadesViewHeader.eq(1).text(startDecade.year()+'-'+endDecade.year());if(this._options.maxDate&&this._options.maxDate.isBefore(endDecade,'y')){decadesViewHeader.eq(2).addClass('disabled');} if(startDecade.year()-10<0){html+=' ';}else{html+=''+(startDecade.year()-10)+'';} while(!startDecade.isAfter(endDecade,'y')){endDecadeYear=startDecade.year()+11;minDateDecade=this._options.minDate&&this._options.minDate.isAfter(startDecade,'y')&&this._options.minDate.year()<=endDecadeYear;maxDateDecade=this._options.maxDate&&this._options.maxDate.isAfter(startDecade,'y')&&this._options.maxDate.year()<=endDecadeYear;html+=''+startDecade.year()+'';startDecade.add(10,'y');} html+=''+startDecade.year()+'';decadesView.find('td').html(html);};TempusDominusBootstrap4.prototype._fillDate=function _fillDate(){var daysView=this.widget.find('.datepicker-days'),daysViewHeader=daysView.find('th'),html=[];var currentDate=void 0,row=void 0,clsName=void 0,i=void 0;if(!this._hasDate()){return;} daysViewHeader.eq(0).find('span').attr('title',this._options.tooltips.prevMonth);daysViewHeader.eq(1).attr('title',this._options.tooltips.selectMonth);daysViewHeader.eq(2).find('span').attr('title',this._options.tooltips.nextMonth);daysView.find('.disabled').removeClass('disabled');daysViewHeader.eq(1).text(this._viewDate.format(this._options.dayViewHeaderFormat));if(!this._isValid(this._viewDate.clone().subtract(1,'M'),'M')){daysViewHeader.eq(0).addClass('disabled');} if(!this._isValid(this._viewDate.clone().add(1,'M'),'M')){daysViewHeader.eq(2).addClass('disabled');} var now=this.getMoment();currentDate=this._viewDate.clone().startOf('M').startOf('w').add(12,'hours');for(i=0;i<42;i++){if(currentDate.weekday()===0){row=$('
    '+currentDate.week()+''+currentDate.date()+'
    '+currentHour.format(this.use24Hours?'HH':'hh')+'
    '+currentMinute.format('mm')+'
    '+currentSecond.format('ss')+'